• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1187
  • Last Modified:

Onclick function

Greeting,

I have an aspx form in Visual Studio 2005. there is a 'submit' button on the form and it needs to submit to another aspx form once it is clicked. But my code below does not work. Please advise.

Thanks in advance.


<script language="javascript" type="text/javascript">
<!--

function Submit1_onclick() {
 
 
 Server.Transfer("report.aspx")
       
 }

-->
</script>
0
mrong
Asked:
mrong
  • 2
  • 2
1 Solution
 
Elvio Lujan.Net Senior DeveloperCommented:
Response.Redirect("report.aspx")
0
 
mrongAuthor Commented:
can is pass the session variables?

Thanks.
0
 
Elvio Lujan.Net Senior DeveloperCommented:
sure where you can pass the session variables?
0
 
mrongAuthor Commented:
I want to pass session variable from form1 to form2.

I tried your suggestion, but got "Response' is undefined'. Do I need load any reference in Visual Studio 2005??

Thanks.
0
 
mirmansoorCommented:
try


<script language="javascript" type="text/javascript">
<!--

function Submit1_onclick() {
 
 
 document.forms[0].action='form2.aspx';
 document.forms[0].submit();
       
 }

-->
</script>
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now