Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / June 2005

Tip: Looking for answers? Try searching our database.

Value of an HTML Textbox not seen in .Net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CoreyMas - 29 Jun 2005 20:23 GMT
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
Elliot M. Rodriguez - 29 Jun 2005 21:29 GMT
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.

> Hello everyone,
>
[quoted text clipped - 25 lines]
>
> Corey

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.