Simple navigation problem

R

Ross Carter

I have the following code that was created automatically by dropping a
button onto a web form and setting the action property of the form

The form is called WebForm2.aspx

<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server" action="WebForm1.aspx">
<asp:Button id="submit" style="Z-INDEX: 101; LEFT: 296px; POSITION:
absolute; TOP: 104px" runat="server"
Text="Button"></asp:Button>
</form>
</body>

When I click the button the page navigates to itself(Webform2.aspx) whereas
I would expect webform1.aspx to be displayed.

I am new to this stuff but I believe that this worked in simple asp

Can anybody help please

Thanks in advance

Ross
 
B

Bhaskardeep Khaund

Hi,

Put a onClick event on the button and write a subroutine for that event on the same page only.
Like

<Script Language="VB" runat="server">
Sub Submit_Click(sender As Object, e As System.EventArgs)
.......Do anything here
End Sub
</script>
<html>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server" action="WebForm1.aspx">
<asp:Button id="submit" style="Z-INDEX: 101; LEFT: 296px; POSITION:absolute; TOP: 104px" runat="server" Text="Button" onClick="Submit_Click"></asp:Button>
</form>
</body>

Hope this helps...

Regards,
Bhaskardeep Khaund
 
R

Ross Carter

Thanks

The effect of my problem is that I cannot send a form to the next aspx page.

How can I send form data without using "?" parameters which show in the title bar

Ross
Hi,

Put a onClick event on the button and write a subroutine for that event on the same page only.
Like

<Script Language="VB" runat="server">
Sub Submit_Click(sender As Object, e As System.EventArgs)
.......Do anything here
End Sub
</script>
<html>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server" action="WebForm1.aspx">
<asp:Button id="submit" style="Z-INDEX: 101; LEFT: 296px; POSITION:absolute; TOP: 104px" runat="server" Text="Button" onClick="Submit_Click"></asp:Button>
</form>
</body>

Hope this helps...

Regards,
Bhaskardeep Khaund
 
R

Ross Carter

I've worked it out

Server.Transfer("Confirm.aspx", True)







Hi,

Put a onClick event on the button and write a subroutine for that event on the same page only.
Like

<Script Language="VB" runat="server">
Sub Submit_Click(sender As Object, e As System.EventArgs)
.......Do anything here
End Sub
</script>
<html>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server" action="WebForm1.aspx">
<asp:Button id="submit" style="Z-INDEX: 101; LEFT: 296px; POSITION:absolute; TOP: 104px" runat="server" Text="Button" onClick="Submit_Click"></asp:Button>
</form>
</body>

Hope this helps...

Regards,
Bhaskardeep Khaund
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top