How to create a click event in a table???

Apollo0130

Newcomer
Joined
Mar 9, 2005
Messages
3
hi @ all,
i have a table in a webform and i must create a link in the table, for example with a link button. i am using vb.net and i have created the link button already, but my problem is to create the click event for the button, which can execute the link when the user clicks the button...

please help me... :confused:

Apollo0130
 
Many ways to do it. I go to the HTML view, and double click on your link button, your codebehind will open up with the genertated click event.
 
Similar problem

I just want to attach a server-side click event to a link on my page, outside of a form. However, the following code simply generates an error when I click the link. I don't have VS.NET, just DWMX. I'm not doing code-behind.

Code:
<%@ Page Language="C#" Debug="True" ContentType="text/html" ResponseEncoding="iso-8859-1" %>

<script runat="server">

  public void Page_Load (Object Sender, EventArgs e) {
    lblWelcome.Text = "Welcome " + Session.Contents["Username"] + ". Your User Level is [" + Session.Contents["UserLevel"] + "].";
  }

  public void lnkLogout_Click (Object Sender, EventArgs e) {
    Session.Contents.RemoveAll();
    Response.Redirect("index.aspx");
  }

</script>

<html>
<head>
<title>GuildRoster Admin</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>

<div align="center">
<table border="0" cellspacing="0" cellpadding="0" width="800">
  <tr>
    <td width="380">
      <ASP:Label ID="lblWelcome"
        Text=""
        RunAt="server" /></td>
    <td width="40" nowrap></td>
    <td width="380" align="right"><a href="#" ID="lnkLogout" onServerClick="lnkLogout_Click" runAt="server">Logout</a></td>
  </tr>
</table>
</div>

</body>
</html>
 
Is there a problem with enclosing that logout link in your web form? If so, then you can make a separate logout page that handles this operation.
 
Back
Top