473,320 Members | 1,876 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,320 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 1390
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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.