Click here to Skip to main content
15,915,600 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: ASP.net with MYSQL Pin
Michael Sync10-Feb-08 19:10
Michael Sync10-Feb-08 19:10 
GeneralRe: ASP.net with MYSQL Pin
Michael Sync10-Feb-08 19:11
Michael Sync10-Feb-08 19:11 
GeneralRe: ASP.net with MYSQL Pin
N a v a n e e t h10-Feb-08 19:46
N a v a n e e t h10-Feb-08 19:46 
QuestionHow to open custom web page when click Browse Button on "File Upload" control Pin
$unil Dhiman10-Feb-08 14:00
$unil Dhiman10-Feb-08 14:00 
GeneralRe: How to open custom web page when click Browse Button on "File Upload" control Pin
Venkatesh Mookkan10-Feb-08 15:45
Venkatesh Mookkan10-Feb-08 15:45 
GeneralRe: How to open custom web page when click Browse Button on "File Upload" control Pin
$unil Dhiman10-Feb-08 20:09
$unil Dhiman10-Feb-08 20:09 
QuestionResponse.BinaryWrite() from within CompositeControl does not work properly Pin
Member 325882310-Feb-08 13:27
Member 325882310-Feb-08 13:27 
Generalimport addresses from gmail, yahoo, hotmail, aol, etc. Pin
shefali_sinha10-Feb-08 12:52
shefali_sinha10-Feb-08 12:52 
GeneralRe: import addresses from gmail, yahoo, hotmail, aol, etc. Pin
dilipv12-Feb-08 0:02
dilipv12-Feb-08 0:02 
QuestionRe: import addresses from gmail, yahoo, hotmail, aol, etc. Pin
shefali_sinha13-Feb-08 8:13
shefali_sinha13-Feb-08 8:13 
GeneralRe: import addresses from gmail, yahoo, hotmail, aol, etc. Pin
sukkureddy26-May-08 19:47
sukkureddy26-May-08 19:47 
GeneralApplication of Digital Dictionary Pin
Abdul8510-Feb-08 7:19
Abdul8510-Feb-08 7:19 
GeneralRe: Application of Digital Dictionary Pin
Paul Conrad10-Feb-08 8:10
professionalPaul Conrad10-Feb-08 8:10 
QuestionAJAX updatepanel not preventing entire page postback? Pin
InvalidTypecast10-Feb-08 6:36
InvalidTypecast10-Feb-08 6:36 
AnswerRe: AJAX updatepanel not preventing entire page postback? Pin
InvalidTypecast11-Feb-08 2:40
InvalidTypecast11-Feb-08 2:40 
AnswerRe: AJAX updatepanel not preventing entire page postback? Pin
sukkureddy26-May-08 19:56
sukkureddy26-May-08 19:56 
AnswerRe: AJAX updatepanel not preventing entire page postback? Pin
sukkureddy26-May-08 19:58
sukkureddy26-May-08 19:58 
Generalembedded control Pin
Gareth H10-Feb-08 4:47
Gareth H10-Feb-08 4:47 
GeneralProblem with a nested repeater Pin
simsen10-Feb-08 0:21
simsen10-Feb-08 0:21 
Hi,

I'm trying to work with nested repeaters. I have repeater 1(called repDetails), where I list errors (from table 1). To each error (row from table 1) there is a file list (from table 2). Each row with error has a unique errorCyklusId witch also is used in table 2 (so I can see which files belongs to which error)

I want my nested repeater (called repFiles) to show alle file names (from table 2).

I need to figure out, how I in ItemDataBound can find the first repeters errorcyklusId for each row and how I can call a control (in this case a hyperlink control) from ItemDataBound

My code:
<code><asp:Repeater ID="repDetails" runat="server" OnItemDataBound="repDetails_ItemDataBound">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
ID: <asp:Label ID="lblDetailsFiles" runat="server" Text='<%# Eval("errorCyklusId") %>'></asp:Label>
<asp:Repeater ID="repFiles" runat="server">
<ItemTemplate> <asp:HyperLink ID="lnkFile" runat="server" Text='<%# Eval("fileName") %>' Target="_blank" NavigateUrl=""></asp:HyperLink>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:Repeater></code>

<code>1 protected void repDetails_ItemDataBound(object sender, RepeaterItemEventArgs e)
2 {
3 //int errorCyklusId = Convert.ToInt32(e.CommandArgument);
4
5 if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
6 {
7 try
8 {
9 ERSError error = new ERSError();
10
11 DataTable filelist = null;
12
13 if (error.GetFileList(1, ref filelist) == Status.Success)
14 {
15 int companyid = Convert.ToInt32(Session[ERSConnect.CookieCompanyId]);
16
17 RepeaterItem item = e.Item;
18 Repeater repFiles = item.FindControl("repFiles") as Repeater;
19 repFiles.DataSource = filelist.DefaultView;
20 repFiles.DataBind();
21 }
22 }
23 catch
24 { }
25 }
26 }
27 </code>

As you can see in line 3 I have comment out the e.CommandArgument (because when I try to run this, I get an error which sais, It dosn't know this.

I then hard coded a 1 (which is a errorCyklusID) in (line 13) (where I call my function (to call the database table) and it works .........but on each row I get the same file names out (because I each time call with the same errorCyklusId (in this case 1).

How do I get the row's errorCyklusID from repeater 1 and how do I get to

&lt;asp:HyperLink ID=""lnkFile" runat="server" Text='&lt;%# Eval("fileName") %&gt;' Target="_blank" NavigateUrl=""&gt;so I can change the NavigateUrl from codebehind in the ItemDataBound?
Kind regards,

simsen Smile | :)
GeneralRe: Problem with a nested repeater Pin
pmarfleet10-Feb-08 7:03
pmarfleet10-Feb-08 7:03 
GeneralRe: Problem with a nested repeater Pin
simsen10-Feb-08 7:48
simsen10-Feb-08 7:48 
GeneralRe: Problem with a nested repeater Pin
pmarfleet10-Feb-08 8:01
pmarfleet10-Feb-08 8:01 
GeneralRe: Problem with a nested repeater Pin
simsen10-Feb-08 8:21
simsen10-Feb-08 8:21 
QuestionCan I access Asp.net Website Adminstrator Tool from the server after deploying my web application? Pin
Nada Adel9-Feb-08 23:19
Nada Adel9-Feb-08 23:19 
AnswerRe: Can I access Asp.net Website Adminstrator Tool from the server after deploying my web application? Pin
pmarfleet10-Feb-08 7:02
pmarfleet10-Feb-08 7:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.