Unable to get client entered data from webcontrol
-
I have created a webform with controls. My idea is to load the text values from these controls as values that the user enters for an insert stored procedure. The insert works. I have one control (server side) that I preload with "today's date", this can be considered the default value. But the user is allow to change the date. My problem is, I enter a new date (like the day before, etc, 1/16/2006 instead of 1/17/2006) and the new date (1/16/2006) does not show as the text value for the textbox control, the control keeps the value I load in at the Page_load method. I am missing how I get the control to "update" to the value I type in. the control is not connected to a dataset or table, etc. I want to use controls to provide text and number data for my insert sql procedure. I remember that the client-side is where the user "changes" the data, how do I get the client-side data to the "server" side? Do I need to use an html button, and use javascript, etc to run an onclick event for the html button??? Thanks, suffering from brain-fade! Thanks for the information!
-
I have created a webform with controls. My idea is to load the text values from these controls as values that the user enters for an insert stored procedure. The insert works. I have one control (server side) that I preload with "today's date", this can be considered the default value. But the user is allow to change the date. My problem is, I enter a new date (like the day before, etc, 1/16/2006 instead of 1/17/2006) and the new date (1/16/2006) does not show as the text value for the textbox control, the control keeps the value I load in at the Page_load method. I am missing how I get the control to "update" to the value I type in. the control is not connected to a dataset or table, etc. I want to use controls to provide text and number data for my insert sql procedure. I remember that the client-side is where the user "changes" the data, how do I get the client-side data to the "server" side? Do I need to use an html button, and use javascript, etc to run an onclick event for the html button??? Thanks, suffering from brain-fade! Thanks for the information!
did you check for !Page.IsPostBack in page_load function when you load default value. otherwise control gets initialized to default value always. Thanks