Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 2nd, 2012, 05:49 PM
Authorized User
 
Join Date: Dec 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to maz_alaameri Send a message via Yahoo to maz_alaameri
Post How to set a href value in GridView

Hi.

I have two parameters I want to include it in HtmlAnchor with gridview,The first parameter is from database And Other one from Url.
Now I want to set ..../QueryString/DatabaseFiled.aspx in code behind for gridview databound.

I try this
foreach (GridViewRow row in GVGuestBookAll.Rows)
{
string str=((Label)GVGuestBookAll.FindControl("lbls")).Te xt;
string str2 = Request.QueryString["NodeID"];
((HtmlAnchor)GVGuestBookAll.FindControl("aa")).HRe f = "../../../admin/edit/subject/" + str2 + "/" + str + ".aspx";
}

but this problem is appear
Object reference not set to an instance of an object.

Pls help me...





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 8, href and HRef (p. 285) roman BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 June 16th, 2008 10:40 AM
Set selected value in GridView dropdownlist SV ASP.NET 2.0 Basics 1 October 24th, 2007 01:18 PM
how to set tabindex in gridview(Button column) amolchikurte ASP.NET 2.0 Professional 2 May 29th, 2007 11:54 PM
href='dbValue' getting set to absolute reference lcsgeek ASP.NET 2.0 Basics 0 July 11th, 2006 03:23 PM
Programmatically set update for one Gridview recor wirerider ASP.NET 2.0 Basics 5 February 11th, 2006 01:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.