473,395 Members | 1,584 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Value of an HTML Textbox not seen in .Net

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
Jul 22 '05 #1
1 1392
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.

CoreyMas wrote:
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

Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
1
by: Paul M. Frazier, Ph.D. | last post by:
I am writing a user information update page and I populate the form on Page_Load with the current values of the user's name, etc. When I change the text in one of the textbox controls (e.g.,...
1
by: Martin | last post by:
Dear Group Sorry for bothering you again but I need expert advice on this. I have placed a HTML textbox on my aspx form and converted it to run as a server control. At some point in my code I...
1
by: Mad Scientist Jr | last post by:
I have a textbox control (for simplicity call it Text1) with autopostback turned on. It has a couple validators: RequiredFieldValidator_Text1 RegularExpressionValidator_Text1 The Text1...
0
by: msnews | last post by:
I need to read the value typed into a textbox (textbox.txt) and then use it in some code that looks like this: Sub Button3_OnClick on error resume next dim CompName Compuser =...
1
by: Will Gillen | last post by:
I know this has probably been asked before, but I can't seem to find a solid answer in any of the archives. First, before my question, please forgive my limited knowledge of the event lifecycle...
2
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
6
by: john | last post by:
The standard method to transmit a file from an aspx page to a browser is to stream the file to the response then end the response. The HTML code generated by the aspx page is discarded, and the...
3
by: remya1000 | last post by:
i'm using ASP with MSAccess as database. i have two buttons and two textbox in my page. when i press my first button (First month) i need to display the current month in one textbox and last one...
10
by: pt36 | last post by:
Hi I have a page with a form and a textbox. before to submit the form I want to chek if the inserted value in the textbox is already present in a database. So I need to pass the textbox value...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.