Solved

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

Posted on 2011-03-16
2
720 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
2 Comments
 
LVL 8

Accepted Solution

by:
Anurag Agarwal earned 500 total points
Comment Utility
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
Comment Utility
Thanks.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now