Calling HTML Form Submit from ASP.net serverside code
-
Basicaly, i seem to be limited to manipulating my database via data objects from forms. However, I want to set it up so that i don't have to actualy click on a submit button to sumbit a form back for processing. I have an asp.net drop down menu, and on the event of a change in value, it reposts the value change to the server. However, to apply this change to a database, i need to create an invisible form, and submit it. I have the form, I have the data bound to the fields that I need inputting. But i can't call submit. What the hell do i do (please)? Cata
-
Basicaly, i seem to be limited to manipulating my database via data objects from forms. However, I want to set it up so that i don't have to actualy click on a submit button to sumbit a form back for processing. I have an asp.net drop down menu, and on the event of a change in value, it reposts the value change to the server. However, to apply this change to a database, i need to create an invisible form, and submit it. I have the form, I have the data bound to the fields that I need inputting. But i can't call submit. What the hell do i do (please)? Cata
When you set a drop down list (I am assuming this is what you are using) to autopostback, the form its on is automatically submitted when its value changes. The event that handles this is selectedIndexChanged. In this event handler you can put database manipulation code, as it is running on the server side. There is no need for you to submit the form yourself, or to create an invisible form! hope this helps, sivilian