Solved

Click event for  <asp:DynamicHyperLink runat="server" Action="Edit" Text="Edit"  />

Posted on 2011-03-16
2
736 Views
Last Modified: 2012-05-11
I need to update a Session variale with the time at the moment of clicking on this  asp:DynamicHyperLink

 <asp:DynamicHyperLink runat="server" Action="Edit" Text="Edit"  />

How do I do that?

newbieweb
0
Comment
Question by:newbieweb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
Anurag Agarwal earned 500 total points
ID: 35150068
newbieweb use link button instead of hyperlink to change session value on the click as link button provides you with onclick event that can be executed on server side which u require to change the session values

in aspx page
<asp:LinkButton id="LinkButton1" Text="Click Me" OnClick="LinkButton_Click" runat="server"/>

in .cs page (for finding this just double click the link button )
 
void LinkButton_Click(Object sender, EventArgs e)
      {
        Session["Login"] = "ADMIN";
// some thing like this ..................
      }

0
 

Author Closing Comment

by:newbieweb
ID: 35152003
Thanks.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question