Separating form elements on aspx page

  • Thread starter Chumley the Walrus
  • Start date
C

Chumley the Walrus

I have a series of controls (a few buttons that clears content,
inserts data into dbase, logs out a user session) that need to work
independently of each other, but I cannot put all these controls into
more than one form tag, as asp.net pages are not allowed to have more
than one < form runat: server> tag. . If i try to logout of a session
on the page with this:
'''
<script language="VB" runat="server">
Sub logout(Sender As Object, e As EventArgs)
Session.Clear()
Response.Redirect("admin-login.aspx")
End Sub
</script>
<asp:Button id="button4" onClick="logout" Text="Logout"
class="inputSubmit" runat="server" />
'''

...it tries to post my info again from the insert textbox objects
before the logout button.

??
chumley
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top