Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how we write following line of script in .aspx.cs page

getElementById('form').submit()


Help me
Posted
Updated 14-Sep-10 22:08pm
v4
Comments
Sandeep Mewara 15-Sep-10 2:53am    
Not clear. Can you please tell what exactly you want? Scneario? Why would you need a form.submit in your code behind?

1 solution

Hi Vinod,

You can write java script from server side (.aspx.cs) using following line:

C#
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "ScriptRegistration", "getElementById('form').submit();", true);


Please do let me know, if you have any doubt.

Please provide Vote if this would be helpful to you.

Thanks,
Imdadhusen
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900