Showing posts with label csharp. Show all posts
Showing posts with label csharp. Show all posts

Saturday, March 31, 2012

submitting in csharp

what's the equivalent of form.submit() "in javascript"
to c# ?
thanks!!!!

There is no equivalent. What are you wanting to do?


I have 3 tags <div id=... runat=server>
I want to view only one of them and hide the two others
I used the tag <select ... runat=server>
<option...>
...
I want to do this without javascript and without vbscript only c#!
I did not clearly understand your problem, but here is my best shot at it.
If you don't want to use javascript to submit a form, then use an asp 'Button' on the page to submit the form. You can drop an asp 'Button' from theToolbox>Web Forms to your page in design view. Then double click on this button to add code in code-behind for this button's click event. In this code you could set the 'Visible' property of the controls you want to hide. Make sure there is a runat='server' attribute for the controls you want to hide in the page's html code file i.e. in page's aspx file.
The asp 'Button', will by default, submit a form to web server for processing.
I hope this helps.