Value of an HTML Textbox not seen in .Net

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello everyone,

Here is my situation

I created an HTML text box that contains a value that is calculated using
Javascript.

I expose this control so that .Net sees it, but when I go to retrieve the
value in .Net i do not get the calculated value, but the default value that I
set at 0

Any reason why this is happening, am i missing something

Here is the code snippets i am using

Protected WithEvents txtTotalScore As System.Web.UI.HtmlControls.HtmlInputText

later on in my code

BL.UpdateRecord(AdmissionsHeader1.EvalFirstName,
AdmissionsHeader1.EvalLastName, AdmissionsHeader1.AdvLastName,
AdmissionsHeader1.AdvFirstName, txtTotalScore.Value, txtGrandTotal.Value,
CInt(Session("AppraisalTypeId")))

Does it have to do with the protected above?

Thanks in advance

Corey
 
Corey:

Is the UpdateRecord code executed on postback?

If so, then you can simply use Request.Form("txtTotalScore").

Otherwise each time the page loads the value will be reset because youre
using client side code to set it.
 
Back
Top