Skip to content

Sorting out links in ASP.NET

April 4, 2012

Not much to say here in this post, just that its Easter and I did a little spring cleaning on the code. So I decided to just go through each of the ASPX pages.

To make a links slightly more dynamic in ASP.NET, I added a LinkButton component shown below, with the code behind to provide the postback URL and text, this can be changed dynamically if the link urls or texts get changed for whatever reason.

<asp:LinkButton ID=”lnkViewInformation” class=”returnButton” runat=”server”></asp:LinkButton>

// Display View Information

lnkViewInformation.PostBackUrl = “../info/viewinformation.aspx”;
lnkViewInformation.Text = “<span>View Information</span>”;

Anyway, happy egg hunting, I mean Easter!

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: