can I lock text boxes or what ?

Results 1 to 2 of 2

Thread: can I lock text boxes or what ?

  1. #1
    Join Date
    Dec 1969

    Default can I lock text boxes or what ?

    I have a form of which I am to update a set of data.<BR>At the moment I have classes to take care of this.<BR>However I am using a drop list (select) to populate a form with the selected row.<BR>This works fine however I am then using the class update method to do the updating to the database.<BR>This is where it is going wrong as I require the folowing code<BR>&#060;%<BR>dim CrsType<BR>set CrsType = new clsCourseType<BR>with CrsType<BR> .ID = Request.Form("txtCrsTypeID")<BR> .Name = Request.Form("txtCrsName")<BR> .Fees = Request.Form("txtFees")<BR> .Update<BR>end with <BR>%&#062;<BR>So I need the request form txt box ("txtCrsTypeID")as it is the auto no(primary field)to do the update around.<BR>So how can I lock the text box on the request form so it can&#039;t be changed but still migrate to the page so the update can occur.

  2. #2
    Join Date
    Dec 1969

    Default Yes, but a much better way... to use <BR><BR> &#060;INPUT TYPE=HIDDEN Name="txtCrsTypeID" Value="&#060;%=RS("...")%&#062;" &#062;<BR><BR>and then, in the *visible* part of the page, do *NOT* show that ID inside a form field. You may not need to show it, at all, but if you do, just use something like:<BR><BR> &#060;TD&#062;&#060;%= RS("...")%&#062;&#060;/TD&#062;<BR><BR>so it just appears as text on the browser screen, not as a form field at all.<BR><BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts