Solved

How to avoid page load event calling towce when called froma hyperlink

Posted on 2011-09-27
3
225 Views
Last Modified: 2013-11-05
I have a page which calls another page through a hyperlink in a grid and the page load event is called twice because of this. How to avoid this, the page.ispostback does not work as its being called from another page and the hyperlink in the grid is something like this below:

<asp:HyperLinkField HeaderText="RNo" Text="CBRNo" DataTextField="RNo" DataNavigateUrlFields="ID" DataNavigateUrlFormatString="Agency.aspx?ID={0}" SortExpression="RNo"/>
0
Comment
Question by:welcome 123
3 Comments
 
LVL 12

Expert Comment

by:Ramkisan Jagtap
ID: 36712063
u can use html anchor tag.
<a href="yourpath"></a>
0
 

Author Comment

by:welcome 123
ID: 36712174
I have other needs to wher I have to use a grid in which clicking on itemid should take you to another page
0
 
LVL 41

Accepted Solution

by:
guru_sami earned 125 total points
ID: 36712186
Instead of HyperLinkField try using TemplateField with HyperLink control like here.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Name space syntax error 12 44
Anyway to make "All" the default in the dropdown? 6 34
C# Single Form 8 28
Close form "before" open 3 28
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

867 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

17 Experts available now in Live!

Get 1:1 Help Now