Click here to Skip to main content
15,886,199 members
Home / Discussions / ASP.NET
   

ASP.NET

 
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 
GeneralLogout Problem !!! Pin
masoodp6669-Feb-08 22:47
masoodp6669-Feb-08 22:47 
GeneralRe: Logout Problem !!! Pin
pmarfleet9-Feb-08 23:01
pmarfleet9-Feb-08 23:01 
GeneralRe: Logout Problem !!! [modified] Pin
masoodp66610-Feb-08 23:32
masoodp66610-Feb-08 23:32 
AnswerRe: Logout Problem !!! Pin
masoodp66611-Feb-08 0:48
masoodp66611-Feb-08 0:48 
Questionhow to get file from internet by using the webclient Pin
Shaik Haneef9-Feb-08 20:37
Shaik Haneef9-Feb-08 20:37 
AnswerDouble post Pin
pmarfleet9-Feb-08 22:56
pmarfleet9-Feb-08 22:56 
AnswerRe: how to get file from internet by using the webclient Pin
Dave Kreskowiak11-Feb-08 4:34
mveDave Kreskowiak11-Feb-08 4:34 
GeneralProduct List Pin
samkaya9-Feb-08 18:14
samkaya9-Feb-08 18:14 
Generali am getting a server error while viewing a page. Pin
coolsatty9-Feb-08 17:42
coolsatty9-Feb-08 17:42 
GeneralRe: i am getting a server error while viewing a page. Pin
pmarfleet10-Feb-08 7:49
pmarfleet10-Feb-08 7:49 
GeneralRe: i am getting a server error while viewing a page. Pin
coolsatty10-Feb-08 23:42
coolsatty10-Feb-08 23:42 

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.