Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > DataGrid HyperLinkColumn question

Reply
Thread Tools

DataGrid HyperLinkColumn question

 
 
Baris Seker
Guest
Posts: n/a
 
      10-27-2003
Hi all,

What I'm trying to do feels like very simple but I can't seem to do it. I
have a datagrid control and the first column is a HyperLink column; a link
to another page that includes variable that retrieved from the db. The html
view of this is below:

<asp:HyperLinkColumn DataNavigateUrlField="message_id"
DataNavigateUrlFormatString="editmessages.aspx?mes sage_id={0}"
DataTextField="message_id" HeaderText="Message Id"
NavigateUrl="editmessages.aspx"></asp:HyperLinkColumn>

It's working as it is, passing the message_id to the other page. What I want
to do is to include another variable in there, which is the value of a text
box on the first page. So the URL to open should be like
.../editmessages.aspx?message_id=1&message_from=blah. How can I do this? How
can I insert the textbox1.text value in the hyperlinkcolumn field?

Thanks in advance!

Baris


 
Reply With Quote
 
 
 
 
Giorgio Parmeggiani
Guest
Posts: n/a
 
      11-01-2003
Hi

Unfortunately the "DataNavigateUrlFormatString" admits only a parameter!

>What I want to do is to include another variable in there, which is the

value of a text
> box on the first page. So the URL to open should be like
> ../editmessages.aspx?message_id=1&message_from=blah. How can I do this?

How can I insert the textbox1.text value in the hyperlinkcolumn field?
>


Then to insert the second value you have two possibilities:

1) Use a TemplateColumn instead of HyperLinkColumn
2) At the ItemDataBound event find and modify the iperlink adding the
TextBox.Text

Hi


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing variables in query string in the HyperLinkColumn of a datagrid aparnasinha26@yahoo.com ASP .Net 2 05-18-2005 06:02 AM
Datagrid - HyperLinkColumn Rob Meade ASP .Net 0 08-09-2004 10:54 AM
Can't apply CSS class to DataGrid's HyperlinkColumn? =?Utf-8?B?RGF2ZQ==?= ASP .Net 1 02-27-2004 04:31 PM
Adding Multiple values to DataGrid HyperLinkColumn dynamically vtreddy ASP .Net 0 11-06-2003 04:10 PM
asp:hyperlinkcolumn Datagrid question... Mike C ASP .Net Web Controls 0 09-09-2003 02:23 AM



Advertisments