473,385 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Help with hyperlinkcolumn, I can't seem to get it work!

I've tried several posting examples to no avail.
I'm trying to pass two parameters to the hyperlink inside of the grid. I've
gone to this link that was posted, and besides the typo (missing '>') I can't
get it to work.
http://www.extremeexperts.com/Net/fa...inURLLink.aspx

Does anyone have a working example?
need: pagename?tab=(tabname)&id={0}
first is a request.param value (tabname)
second is a container field (SurveyResponseheaderid)

Help......Thanx.
Nov 19 '05 #1
4 1153
How about this? Does this work for you?
<asp:datagrid id="Datagrid1" runat="server" AutoGenerateColumns="False"
BorderColor="black"
HeaderStyle-CssClass="tableHeader" ItemStyle-CssClass= "tableItem">
<Columns>
<asp:TemplateColumn HeaderText="MyCol">
<ItemTemplate>
<asp:Hyperlink runat="server"
Text='<%#DataBinder.Eval(Container.DataItem,"Name" )%>'
NavigateUrl='pagename?tab=<%Request.QueryString("t abname")%>&id=<%#DataBinde
r.Eval(Container.DataItem,"SurveyResponseheaderid" )%>' ID="Hyperlink1"/>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>

--
Gopal Rangaswamy
Microsoft Certified Solutions Developer
FMS, Inc.
<http://www.fmsinc.com/consulting>
<http://www.fmsinc.com/dotnet/SourceBook/>

"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:8E**********************************@microsof t.com...
I've tried several posting examples to no avail.
I'm trying to pass two parameters to the hyperlink inside of the grid. I've gone to this link that was posted, and besides the typo (missing '>') I can't get it to work.
http://www.extremeexperts.com/Net/fa...inURLLink.aspx
Does anyone have a working example?
need: pagename?tab=(tabname)&id={0}
first is a request.param value (tabname)
second is a container field (SurveyResponseheaderid)

Help......Thanx.

Nov 19 '05 #2
I tried this and as I thought, it doesn't appear to allow <% %>.
So when you look at the link it lists the text
<%Request.Params("tab")%>&id=<%#DataBinder.Eval(Co ntainer.DataItem,"SurveyResponseheaderid")%>'

"Gopal (FMS, Inc.)" wrote:
How about this? Does this work for you?
<asp:datagrid id="Datagrid1" runat="server" AutoGenerateColumns="False"
BorderColor="black"
HeaderStyle-CssClass="tableHeader" ItemStyle-CssClass= "tableItem">
<Columns>
<asp:TemplateColumn HeaderText="MyCol">
<ItemTemplate>
<asp:Hyperlink runat="server"
Text='<%#DataBinder.Eval(Container.DataItem,"Name" )%>'
NavigateUrl='pagename?tab=<%Request.QueryString("t abname")%>&id=<%#DataBinde
r.Eval(Container.DataItem,"SurveyResponseheaderid" )%>' ID="Hyperlink1"/>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>

--
Gopal Rangaswamy
Microsoft Certified Solutions Developer
FMS, Inc.
<http://www.fmsinc.com/consulting>
<http://www.fmsinc.com/dotnet/SourceBook/>

"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:8E**********************************@microsof t.com...
I've tried several posting examples to no avail.
I'm trying to pass two parameters to the hyperlink inside of the grid.

I've
gone to this link that was posted, and besides the typo (missing '>') I

can't
get it to work.

http://www.extremeexperts.com/Net/fa...inURLLink.aspx

Does anyone have a working example?
need: pagename?tab=(tabname)&id={0}
first is a request.param value (tabname)
second is a container field (SurveyResponseheaderid)

Help......Thanx.


Nov 19 '05 #3
Here is the corrected version,

<asp:datagrid id="Datagrid1"
runat="server" AutoGenerateColumns="False" BorderColor="black"
HeaderStyle-CssClass="tableHeader"
ItemStyle-CssClass="tableItem">

<Columns>
<asp:TemplateColumn HeaderText="Order">
<ItemTemplate>
<asp:Hyperlink runat="server" Text= '<%#
DataBinder.Eval(Container.DataItem,"ProductName"). tostring %>'
NavigateUrl='<%# "page.aspx?Name=" & DataBinder.Eval
(Container.DataItem,"ProductName").tostring & _

"&ProductID=" &
DataBinder.Eval(Container.DataItem,"ProductID").to string %>'
ID="ProductName"/>
</ItemTemplate>
</asp:TemplateColumn>

</Columns>

</asp:datagrid>
Check out now, if you still face problem. Let me know about it.

--
-Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com

"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:83**********************************@microsof t.com...
I tried this and as I thought, it doesn't appear to allow <% %>.
So when you look at the link it lists the text:
<%Request.Params("tab")%>&id=<%#DataBinder.Eval(Co ntainer.DataItem,"SurveyRe
sponseheaderid")%>'
"Gopal (FMS, Inc.)" wrote:
How about this? Does this work for you?
<asp:datagrid id="Datagrid1" runat="server" AutoGenerateColumns="False"
BorderColor="black"
HeaderStyle-CssClass="tableHeader" ItemStyle-CssClass= "tableItem"> <Columns>
<asp:TemplateColumn HeaderText="MyCol">
<ItemTemplate>
<asp:Hyperlink runat="server"
Text='<%#DataBinder.Eval(Container.DataItem,"Name" )%>'
NavigateUrl='pagename?tab=<%Request.QueryString("t abname")%>&id=<%#DataBinde r.Eval(Container.DataItem,"SurveyResponseheaderid" )%>' ID="Hyperlink1"/>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>

--
Gopal Rangaswamy
Microsoft Certified Solutions Developer
FMS, Inc.
<http://www.fmsinc.com/consulting>
<http://www.fmsinc.com/dotnet/SourceBook/>

"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:8E**********************************@microsof t.com...
I've tried several posting examples to no avail.
I'm trying to pass two parameters to the hyperlink inside of the grid.

I've
gone to this link that was posted, and besides the typo (missing '>') I
can't
get it to work.

http://www.extremeexperts.com/Net/fa...inURLLink.aspx
Does anyone have a working example?
need: pagename?tab=(tabname)&id={0}
first is a request.param value (tabname)
second is a container field (SurveyResponseheaderid)

Help......Thanx.


Nov 19 '05 #4
thanx! that was the ticket! Thanx to both of you!

"Saravana" wrote:
Here is the corrected version,

<asp:datagrid id="Datagrid1"
runat="server" AutoGenerateColumns="False" BorderColor="black"
HeaderStyle-CssClass="tableHeader"
ItemStyle-CssClass="tableItem">

<Columns>
<asp:TemplateColumn HeaderText="Order">
<ItemTemplate>
<asp:Hyperlink runat="server" Text= '<%#
DataBinder.Eval(Container.DataItem,"ProductName"). tostring %>'
NavigateUrl='<%# "page.aspx?Name=" & DataBinder.Eval
(Container.DataItem,"ProductName").tostring & _

"&ProductID=" &
DataBinder.Eval(Container.DataItem,"ProductID").to string %>'
ID="ProductName"/>
</ItemTemplate>
</asp:TemplateColumn>

</Columns>

</asp:datagrid>
Check out now, if you still face problem. Let me know about it.

--
-Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com

"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:83**********************************@microsof t.com...
I tried this and as I thought, it doesn't appear to allow <% %>.
So when you look at the link it lists the text:

<%Request.Params("tab")%>&id=<%#DataBinder.Eval(Co ntainer.DataItem,"SurveyRe
sponseheaderid")%>'

"Gopal (FMS, Inc.)" wrote:
How about this? Does this work for you?
<asp:datagrid id="Datagrid1" runat="server" AutoGenerateColumns="False"
BorderColor="black"
HeaderStyle-CssClass="tableHeader" ItemStyle-CssClass= "tableItem"> <Columns>
<asp:TemplateColumn HeaderText="MyCol">
<ItemTemplate>
<asp:Hyperlink runat="server"
Text='<%#DataBinder.Eval(Container.DataItem,"Name" )%>'
NavigateUrl='pagename?tab=<%Request.QueryString("t abname")%>&id=<%#DataBinde r.Eval(Container.DataItem,"SurveyResponseheaderid" )%>' ID="Hyperlink1"/>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>

--
Gopal Rangaswamy
Microsoft Certified Solutions Developer
FMS, Inc.
<http://www.fmsinc.com/consulting>
<http://www.fmsinc.com/dotnet/SourceBook/>

"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:8E**********************************@microsof t.com...
> I've tried several posting examples to no avail.
> I'm trying to pass two parameters to the hyperlink inside of the grid.
I've
> gone to this link that was posted, and besides the typo (missing '>') I can't
> get it to work.
>
http://www.extremeexperts.com/Net/fa...inURLLink.aspx >
> Does anyone have a working example?
> need: pagename?tab=(tabname)&id={0}
> first is a request.param value (tabname)
> second is a container field (SurveyResponseheaderid)
>
> Help......Thanx.


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jongmin | last post by:
Hi! I am making HyperLinkColumn in datagrid. It is simple to make the hyerlinkcolumn with one datafield. <asp:HyperLinkColumn Text="NAME" DataNavigateUrlField="NAME"...
1
by: Dmitri Manushin | last post by:
Hi all, i have HyperLinkColumn in DataGrid <asp:HyperLinkColumn DataNavigateUrlField="PostID" DataNavigateUrlFormatString="http://localhost/forum/posts.aspx?id={0}" DataTextField="Subject"...
3
by: SStory | last post by:
I have a style sheet for my site. It has various classes in it. It has <A: styles defined for all anchor tags. I have a datagrid in ASP.NET with a stylesheet linked to the page. It defines...
3
by: Morten | last post by:
Hi. After a while I finaly discovered how to use HyperLinkColumns. What I can't find is how to send mote than one "value" like page.aspx?id1&id2!!! <asp:HyperLinkColumn...
3
by: TJS | last post by:
how can I encrypt the querystring values for a HyperLinkColumn ? in example below I would like to encrypt value for field1 ======================================================...
0
by: Tim::.. | last post by:
Question 1... Hi can someone please tell me why I can't put the following LDAP string into my web.config fill as an <appSetting> <appSettings> <add key="strLDAP"...
10
by: tshad | last post by:
I have a Datagrid with a column: <asp:HyperLinkColumn DataTextField="JobTitle" DataNavigateUrlField="PositionID" DataNavigateUrlFormatString="AddNewPositions.aspx?PositionID={0}"...
1
by: Roy | last post by:
I'm assuming this is amazingly simple and I'm just missing the boat. On the html side of an asp.net page I have a datagrid, a "search" button, and 8 text boxes for search criteria. A user enters...
2
by: serge calderara | last post by:
Dear all, I have a dataset bound to a datagrid object. One of this grid column is an HyperLinkColumn template defined as follow : <asp:HyperLinkColumn HeaderText="ID" DataTextField="ID"...
2
by: momo | last post by:
Hello Guys, I have a bit of a problem, I created a Dll called SecureQueryStringDll.dll and I had the dll put bin folder of my application first and it did not work so I then put it in the bin...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.