Thanks Guru_sami.
I want to pass two parameters at the same time not one. I want to pass the id and the filename.
<asp:HyperLink
id="lnkFile"
Text='<%#Eval("FileName")%>'
NavigateUrl='<%#Eval("Id", "~/FileHandlerLarge.ashx?i
Runat="server" />
Main Topics
Browse All Topics





by: guru_samiPosted on 2009-11-03 at 10:13:14ID: 25731751
Couple ways:
d=" + filename;
ject sender, RepeaterItemEventArgs e) em)) { File");
1:
NavigateUrl='<%# GetUrl(Eval("FileName"))%>'
code-behind:
public string GetUrl(string filename)
{
string url = "~/FileHandlerLarge.ashx?i
return url;
}
2: In the Repeater ItemDataBound event handler find the Hyperlink and set its NavigateUrl programatically:
protected void Repeater1_ItemDataBound(ob
{
RepeaterItem item = e.Item;
if ((item.ItemType == ListItemType.Item) || (item.ItemType == ListItemType.AlternatingIt
HyperLink hl= (Label)item.HyperLink("lnk
if (hl!= null) {
hl.NavigateUrl = "yourUrl";
}
}
}