Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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.

 

<%@ 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>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...