473,739 Members | 5,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

server controls nested in DataList

What seems like a simple thing is apparently not so
straightforward ?

I have a datalist.

Inside of that datalist is an <itemtemplate > secion which
contains other server controls such as a label, a
radiobuttonlist , etc.

I'm driving myself insane trying to figure out how to get
data in and out of those controls contained in the
datalist!

For example, I want to populate the radiobutton and label
being repeated for each row of data.

Also, the <itemtemplate > defines an imagebutton.

I want to be able (for each item) to choose something
from the radiobuttonlist and then click the imagebutton
to submit to another page.

I've found that I can use FindControl() in the
ItemCreated event handler for the DataList to *find* the
control itself, however, that isn't my problem.

My problem is in the OnClick event handler for the
imagebutton for each item, I'm unable to access the
radiobuttonlist selected item!

How is this done? What's the cleanest, simplest way to
get access and fire events from nested controls like this?

Thanks!
Nov 18 '05 #1
4 3094
Hi, V. Jenks,

Maybe my replies to the subject "Controls in HeaderTemplate" by Yan Wang
could be helpful.

Basically this is the situation on the postback:

The handler for the ImageButton OnClick event is executed first - you set
some flag in a private field of your page class that this has happened.

Then the handler of the OnItemCreated event of the DataList gets executed.
Here you get gold of references to the controls you need to work with
later - store these in private fields of the class.

Then, after the viewstate is loaded (I choose to handle the PreRender event
of the DataList), check if there should be some processing (the flag set in
the ImageButton OnClick handler, that is). If yes - execute a method that
will do the actual processing.

Hope this helps
Martin
"V. Jenks" <sp**@scientifi k.com> wrote in message
news:1f******** *************** *****@phx.gbl.. .
What seems like a simple thing is apparently not so
straightforward ?

I have a datalist.

Inside of that datalist is an <itemtemplate > secion which
contains other server controls such as a label, a
radiobuttonlist , etc.

I'm driving myself insane trying to figure out how to get
data in and out of those controls contained in the
datalist!

For example, I want to populate the radiobutton and label
being repeated for each row of data.

Also, the <itemtemplate > defines an imagebutton.

I want to be able (for each item) to choose something
from the radiobuttonlist and then click the imagebutton
to submit to another page.

I've found that I can use FindControl() in the
ItemCreated event handler for the DataList to *find* the
control itself, however, that isn't my problem.

My problem is in the OnClick event handler for the
imagebutton for each item, I'm unable to access the
radiobuttonlist selected item!

How is this done? What's the cleanest, simplest way to
get access and fire events from nested controls like this?

Thanks!


Nov 18 '05 #2
I'm not sure I follow you. Here is where I'm at:

The control:

<asp:datalist
id="CrossSellLi st"
onload="CrossSe llList_Load"
onitemcreated=" CrossSellList_I temCreated"

onselectedindex changed="CrossS ellList_Selecte dIndexChanged
"
repeatdirection ="Vertical"
runat="server">
<itemtemplate >
<asp:radiobutto nlist

id="ProductOpti onsList"

repeatdirection ="Vertical"
cssclass="Norma l"
runat="server"
/>

<asp:requiredfi eldvalidator

controltovalida te="ProductOpti onsList"

errormessage="Y ou must choose a product option before
adding item to shopping cart!"

enableclientscr ipt="True"
/>
<br />
<asp:imagebutto n

id="AddToCartBt tn"

onload="AddToCa rtBttn_Load"
runat="server"
/>
</td>
</tr>
</table>
</itemtemplate>
<selecteditemte mplate>
</selecteditemtem plate>
</asp:datalist>

In the code behind:

protected void CrossSellList_L oad(object
sender, System.EventArg s e)
{
CrossSellList.D ataSource =
ProductManager. GetCrossSellPro ducts();
CrossSellList.D ataBind();
}

protected void AddToCartBttn_L oad(object
sender, System.EventArg s e)
{
ImageButton bttn = (ImageButton)
sender;
bttn.ImageUrl = String.Format("/
{0}/images/buy_now.gif", this.WebRoot);
}

protected void CrossSellList_I temCreated
(object sender, DataListItemEve ntArgs e)
{
ListItemType lit =
e.Item.ItemType ;
if (lit == ListItemType.He ader ||
lit ==
ListItemType.Fo oter ||
lit ==
ListItemType.Se parator)
return;

Label titleLbl = (Label)
e.Item.FindCont rol("ProductAva ilabilityLbl");
RadioButtonList prodOpList =
(RadioButtonLis t)e.Item.FindCo ntrol("ProductO ptionsList");

if (!Page.IsPostBa ck)
{
IProduct product =
(IProduct)e.Ite m.DataItem;
IList prodOptions =
ProductManager. GetProductOptio nsByProduct(pro duct);

//populate product
options repeater
prodOpList.Data Source =
prodOptions;
prodOpList.Data TextField
= "Name";
prodOpList.Data ValueField
= "ID";
prodOpList.Data Bind();

if (prodOptions.Co unt > 0)
titleLbl.Text
= "Available in:";

Response.Write
(product.Name);
}
}
NOW - When each button is clicked, I want to access what
was chosen in each individual radiobuttonlist , and
redirect to a new page.

-----Original Message-----
Hi, V. Jenks,

Maybe my replies to the subject "Controls in HeaderTemplate" by Yan Wangcould be helpful.

Basically this is the situation on the postback:

The handler for the ImageButton OnClick event is executed first - you setsome flag in a private field of your page class that this has happened.
Then the handler of the OnItemCreated event of the DataList gets executed.Here you get gold of references to the controls you need to work withlater - store these in private fields of the class.

Then, after the viewstate is loaded (I choose to handle the PreRender eventof the DataList), check if there should be some processing (the flag set inthe ImageButton OnClick handler, that is). If yes - execute a method thatwill do the actual processing.

Hope this helps
Martin
"V. Jenks" <sp**@scientifi k.com> wrote in message
news:1f******* *************** ******@phx.gbl. ..
What seems like a simple thing is apparently not so
straightforward ?

I have a datalist.

Inside of that datalist is an <itemtemplate > secion which contains other server controls such as a label, a
radiobuttonlist , etc.

I'm driving myself insane trying to figure out how to get data in and out of those controls contained in the
datalist!

For example, I want to populate the radiobutton and label being repeated for each row of data.

Also, the <itemtemplate > defines an imagebutton.

I want to be able (for each item) to choose something
from the radiobuttonlist and then click the imagebutton
to submit to another page.

I've found that I can use FindControl() in the
ItemCreated event handler for the DataList to *find* the control itself, however, that isn't my problem.

My problem is in the OnClick event handler for the
imagebutton for each item, I'm unable to access the
radiobuttonlist selected item!

How is this done? What's the cleanest, simplest way to
get access and fire events from nested controls like this?
Thanks!


.

Nov 18 '05 #3
Hi,

The following is a working example. Sorry if I misleaded you, your situation
is quite simpler than the other one.

Anyway, little explanation of the code:

In the handler of the OnCommand event of the ImageButtons we loop through
the item collection of the DataList until FindControl("Ad dToCartBttn")
returns a control instance that equals the event source - the first
parameter of the handler, that is. Then we get reference to the
RadioButtonList which is in the current DataListItem and that's all.

listing <test.aspx>:

<%@ Page language="C#" inherits="test_ aspx" %>
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en"
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test</title>
</head>
<body>
<form id="form1" method="post" runat="server">
<asp:datalist id="CrossSellLi st" runat="server"
repeatdirection ="Vertical" runat="server">
<itemtemplate >
<asp:radiobutto nlist id="ProductOpti onsList"
repeatdirection ="Vertical" runat="server"
datasource='<%# DataBinder.Eval (Container.Data Item, "ARRAY")%>'/>
<br />
<asp:imagebutto n id="AddToCartBt tn"
oncommand="AddT oCartBttn_Comma nd" runat="server"
commandname='<% # DataBinder.Eval (Container.Data Item, "ID")%>'/>
</td>
</tr>
</table>
</itemtemplate>
</asp:datalist>
<br />
<br />
ID: <asp:literal id="LiteralID" runat="server"/><br />
Selected: <asp:literal id="LiteralSele cted" runat="server"/>
</form>
</body>
</html>

listing <test_aspx.cs >:

using System;

public class test_aspx : System.Web.UI.P age
{
protected System.Web.UI.W ebControls.Data List CrossSellList;
protected System.Web.UI.W ebControls.Lite ral LiteralID, LiteralSelected ;

protected void Page_Load(objec t s, EventArgs e)
{
if(!IsPostBack)
{
System.Data.Dat aTable dt =
new System.Data.Dat aTable();
System.Data.Dat aRow dr;
dt.Columns.Add( "ID", typeof(string)) ;
dt.Columns.Add( "ARRAY", typeof(string[]));
dr = dt.NewRow();
dr[0] = "1";
dr[1] = new string[]
{"Option 1", "Option 2", "Option 3"};
dt.Rows.Add(dr) ;
dr = dt.NewRow();
dr[0] = "2";
dr[1] = new string[]
{"Value 1", "Value 2", "Value 3"};
dt.Rows.Add(dr) ;
CrossSellList.D ataSource = dt.DefaultView;
CrossSellList.D ataBind();
}
}

protected void AddToCartBttn_C ommand(object s,
System.Web.UI.W ebControls.Comm andEventArgs e)
{
foreach(System. Web.UI.WebContr ols.DataListIte m item
in CrossSellList.I tems)
{
if(item.ItemTyp e == System.Web.UI.W ebControls.List ItemType.Item ||
item.ItemType == System.Web.UI.W ebControls.List ItemType.Altern atingItem)
{
System.Web.UI.W ebControls.Imag eButton AddToCartBttn =
item.FindContro l("AddToCartBtt n") as
System.Web.UI.W ebControls.Imag eButton;
if(AddToCartBtt n != null && AddToCartBttn.C ommandName == e.CommandName)
{
System.Web.UI.W ebControls.Radi oButtonList _ProductOptions List =
item.FindContro l("ProductOptio nsList") as
System.Web.UI.W ebControls.Radi oButtonList;
LiteralID.Text = e.CommandName;
LiteralSelected .Text = string.Format(
@"Index: {0};Value: {1};Text: {2}",
_ProductOptions List.SelectedIn dex,
_ProductOptions List.SelectedVa lue,
_ProductOptions List.SelectedIt em.Text);
}
}
}
}
}

Hope this helps
Martin
<an*******@disc ussions.microso ft.com> wrote in message
news:24******** *************** *****@phx.gbl.. .
I'm not sure I follow you. Here is where I'm at:

The control:

<asp:datalist
id="CrossSellLi st"
onload="CrossSe llList_Load"
onitemcreated=" CrossSellList_I temCreated"

onselectedindex changed="CrossS ellList_Selecte dIndexChanged
"
repeatdirection ="Vertical"
runat="server">
<itemtemplate >
<asp:radiobutto nlist

id="ProductOpti onsList"

repeatdirection ="Vertical"
cssclass="Norma l"
runat="server"
/>

<asp:requiredfi eldvalidator

controltovalida te="ProductOpti onsList"

errormessage="Y ou must choose a product option before
adding item to shopping cart!"

enableclientscr ipt="True"
/>
<br />
<asp:imagebutto n

id="AddToCartBt tn"

onload="AddToCa rtBttn_Load"
runat="server"
/>
</td>
</tr>
</table>
</itemtemplate>
<selecteditemte mplate>
</selecteditemtem plate>
</asp:datalist>

In the code behind:

protected void CrossSellList_L oad(object
sender, System.EventArg s e)
{
CrossSellList.D ataSource =
ProductManager. GetCrossSellPro ducts();
CrossSellList.D ataBind();
}

protected void AddToCartBttn_L oad(object
sender, System.EventArg s e)
{
ImageButton bttn = (ImageButton)
sender;
bttn.ImageUrl = String.Format("/
{0}/images/buy_now.gif", this.WebRoot);
}

protected void CrossSellList_I temCreated
(object sender, DataListItemEve ntArgs e)
{
ListItemType lit =
e.Item.ItemType ;
if (lit == ListItemType.He ader ||
lit ==
ListItemType.Fo oter ||
lit ==
ListItemType.Se parator)
return;

Label titleLbl = (Label)
e.Item.FindCont rol("ProductAva ilabilityLbl");
RadioButtonList prodOpList =
(RadioButtonLis t)e.Item.FindCo ntrol("ProductO ptionsList");

if (!Page.IsPostBa ck)
{
IProduct product =
(IProduct)e.Ite m.DataItem;
IList prodOptions =
ProductManager. GetProductOptio nsByProduct(pro duct);

//populate product
options repeater
prodOpList.Data Source =
prodOptions;
prodOpList.Data TextField
= "Name";
prodOpList.Data ValueField
= "ID";
prodOpList.Data Bind();

if (prodOptions.Co unt > 0)
titleLbl.Text
= "Available in:";

Response.Write
(product.Name);
}
}
NOW - When each button is clicked, I want to access what
was chosen in each individual radiobuttonlist , and
redirect to a new page.

-----Original Message-----
Hi, V. Jenks,

Maybe my replies to the subject "Controls in

HeaderTemplate" by Yan Wang
could be helpful.

Basically this is the situation on the postback:

The handler for the ImageButton OnClick event is

executed first - you set
some flag in a private field of your page class that

this has happened.

Then the handler of the OnItemCreated event of the

DataList gets executed.
Here you get gold of references to the controls you need

to work with
later - store these in private fields of the class.

Then, after the viewstate is loaded (I choose to handle

the PreRender event
of the DataList), check if there should be some

processing (the flag set in
the ImageButton OnClick handler, that is). If yes -

execute a method that
will do the actual processing.

Hope this helps
Martin
"V. Jenks" <sp**@scientifi k.com> wrote in message
news:1f******* *************** ******@phx.gbl. ..
What seems like a simple thing is apparently not so
straightforward ?

I have a datalist.

Inside of that datalist is an <itemtemplate > secion which contains other server controls such as a label, a
radiobuttonlist , etc.

I'm driving myself insane trying to figure out how to get data in and out of those controls contained in the
datalist!

For example, I want to populate the radiobutton and label being repeated for each row of data.

Also, the <itemtemplate > defines an imagebutton.

I want to be able (for each item) to choose something
from the radiobuttonlist and then click the imagebutton
to submit to another page.

I've found that I can use FindControl() in the
ItemCreated event handler for the DataList to *find* the control itself, however, that isn't my problem.

My problem is in the OnClick event handler for the
imagebutton for each item, I'm unable to access the
radiobuttonlist selected item!

How is this done? What's the cleanest, simplest way to
get access and fire events from nested controls like this?
Thanks!


.


Nov 18 '05 #4
Sorry, I posted an earlier version, that can be simplificated a bit. Replace
this:
System.Web.UI.W ebControls.Imag eButton AddToCartBttn =
item.FindContro l("AddToCartBtt n") as
System.Web.UI.W ebControls.Imag eButton;
if(AddToCartBtt n != null && AddToCartBttn.C ommandName == e.CommandName) {

with this:

object AddToCartBttn = item.FindContro l("AddToCartBtt n");
if(AddToCartBtt n != null && AddToCartBttn.E quals(s)) {

In the AddToCartBttn_C ommand handler.

Greetings
Martin
"Martin Dechev" <de*******@hotm ail.com> wrote in message
news:Ok******** ******@TK2MSFTN GP12.phx.gbl... Hi,

The following is a working example. Sorry if I misleaded you, your situation is quite simpler than the other one.

Anyway, little explanation of the code:

In the handler of the OnCommand event of the ImageButtons we loop through
the item collection of the DataList until FindControl("Ad dToCartBttn")
returns a control instance that equals the event source - the first
parameter of the handler, that is. Then we get reference to the
RadioButtonList which is in the current DataListItem and that's all.

listing <test.aspx>:

<%@ Page language="C#" inherits="test_ aspx" %>
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en"
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test</title>
</head>
<body>
<form id="form1" method="post" runat="server">
<asp:datalist id="CrossSellLi st" runat="server"
repeatdirection ="Vertical" runat="server">
<itemtemplate >
<asp:radiobutto nlist id="ProductOpti onsList"
repeatdirection ="Vertical" runat="server"
datasource='<%# DataBinder.Eval (Container.Data Item, "ARRAY")%>'/>
<br />
<asp:imagebutto n id="AddToCartBt tn"
oncommand="AddT oCartBttn_Comma nd" runat="server"
commandname='<% # DataBinder.Eval (Container.Data Item, "ID")%>'/>
</td>
</tr>
</table>
</itemtemplate>
</asp:datalist>
<br />
<br />
ID: <asp:literal id="LiteralID" runat="server"/><br />
Selected: <asp:literal id="LiteralSele cted" runat="server"/>
</form>
</body>
</html>

listing <test_aspx.cs >:

using System;

public class test_aspx : System.Web.UI.P age
{
protected System.Web.UI.W ebControls.Data List CrossSellList;
protected System.Web.UI.W ebControls.Lite ral LiteralID, LiteralSelected ;

protected void Page_Load(objec t s, EventArgs e)
{
if(!IsPostBack)
{
System.Data.Dat aTable dt =
new System.Data.Dat aTable();
System.Data.Dat aRow dr;
dt.Columns.Add( "ID", typeof(string)) ;
dt.Columns.Add( "ARRAY", typeof(string[]));
dr = dt.NewRow();
dr[0] = "1";
dr[1] = new string[]
{"Option 1", "Option 2", "Option 3"};
dt.Rows.Add(dr) ;
dr = dt.NewRow();
dr[0] = "2";
dr[1] = new string[]
{"Value 1", "Value 2", "Value 3"};
dt.Rows.Add(dr) ;
CrossSellList.D ataSource = dt.DefaultView;
CrossSellList.D ataBind();
}
}

protected void AddToCartBttn_C ommand(object s,
System.Web.UI.W ebControls.Comm andEventArgs e)
{
foreach(System. Web.UI.WebContr ols.DataListIte m item
in CrossSellList.I tems)
{
if(item.ItemTyp e == System.Web.UI.W ebControls.List ItemType.Item ||
item.ItemType == System.Web.UI.W ebControls.List ItemType.Altern atingItem)
{
System.Web.UI.W ebControls.Imag eButton AddToCartBttn =
item.FindContro l("AddToCartBtt n") as
System.Web.UI.W ebControls.Imag eButton;
if(AddToCartBtt n != null && AddToCartBttn.C ommandName == e.CommandName)
{
System.Web.UI.W ebControls.Radi oButtonList _ProductOptions List =
item.FindContro l("ProductOptio nsList") as
System.Web.UI.W ebControls.Radi oButtonList;
LiteralID.Text = e.CommandName;
LiteralSelected .Text = string.Format(
@"Index: {0};Value: {1};Text: {2}",
_ProductOptions List.SelectedIn dex,
_ProductOptions List.SelectedVa lue,
_ProductOptions List.SelectedIt em.Text);
}
}
}
}
}

Hope this helps
Martin
<an*******@disc ussions.microso ft.com> wrote in message
news:24******** *************** *****@phx.gbl.. .
I'm not sure I follow you. Here is where I'm at:

The control:

<asp:datalist
id="CrossSellLi st"
onload="CrossSe llList_Load"
onitemcreated=" CrossSellList_I temCreated"

onselectedindex changed="CrossS ellList_Selecte dIndexChanged
"
repeatdirection ="Vertical"
runat="server">
<itemtemplate >
<asp:radiobutto nlist

id="ProductOpti onsList"

repeatdirection ="Vertical"
cssclass="Norma l"
runat="server"
/>

<asp:requiredfi eldvalidator

controltovalida te="ProductOpti onsList"

errormessage="Y ou must choose a product option before
adding item to shopping cart!"

enableclientscr ipt="True"
/>
<br />
<asp:imagebutto n

id="AddToCartBt tn"

onload="AddToCa rtBttn_Load"
runat="server"
/>
</td>
</tr>
</table>
</itemtemplate>
<selecteditemte mplate>
</selecteditemtem plate>
</asp:datalist>

In the code behind:

protected void CrossSellList_L oad(object
sender, System.EventArg s e)
{
CrossSellList.D ataSource =
ProductManager. GetCrossSellPro ducts();
CrossSellList.D ataBind();
}

protected void AddToCartBttn_L oad(object
sender, System.EventArg s e)
{
ImageButton bttn = (ImageButton)
sender;
bttn.ImageUrl = String.Format("/
{0}/images/buy_now.gif", this.WebRoot);
}

protected void CrossSellList_I temCreated
(object sender, DataListItemEve ntArgs e)
{
ListItemType lit =
e.Item.ItemType ;
if (lit == ListItemType.He ader ||
lit ==
ListItemType.Fo oter ||
lit ==
ListItemType.Se parator)
return;

Label titleLbl = (Label)
e.Item.FindCont rol("ProductAva ilabilityLbl");
RadioButtonList prodOpList =
(RadioButtonLis t)e.Item.FindCo ntrol("ProductO ptionsList");

if (!Page.IsPostBa ck)
{
IProduct product =
(IProduct)e.Ite m.DataItem;
IList prodOptions =
ProductManager. GetProductOptio nsByProduct(pro duct);

//populate product
options repeater
prodOpList.Data Source =
prodOptions;
prodOpList.Data TextField
= "Name";
prodOpList.Data ValueField
= "ID";
prodOpList.Data Bind();

if (prodOptions.Co unt > 0)
titleLbl.Text
= "Available in:";

Response.Write
(product.Name);
}
}
NOW - When each button is clicked, I want to access what
was chosen in each individual radiobuttonlist , and
redirect to a new page.

-----Original Message-----
Hi, V. Jenks,

Maybe my replies to the subject "Controls in

HeaderTemplate" by Yan Wang
could be helpful.

Basically this is the situation on the postback:

The handler for the ImageButton OnClick event is

executed first - you set
some flag in a private field of your page class that

this has happened.

Then the handler of the OnItemCreated event of the

DataList gets executed.
Here you get gold of references to the controls you need

to work with
later - store these in private fields of the class.

Then, after the viewstate is loaded (I choose to handle

the PreRender event
of the DataList), check if there should be some

processing (the flag set in
the ImageButton OnClick handler, that is). If yes -

execute a method that
will do the actual processing.

Hope this helps
Martin
"V. Jenks" <sp**@scientifi k.com> wrote in message
news:1f******* *************** ******@phx.gbl. ..
> What seems like a simple thing is apparently not so
> straightforward ?
>
> I have a datalist.
>
> Inside of that datalist is an <itemtemplate > secion

which
> contains other server controls such as a label, a
> radiobuttonlist , etc.
>
> I'm driving myself insane trying to figure out how to

get
> data in and out of those controls contained in the
> datalist!
>
> For example, I want to populate the radiobutton and

label
> being repeated for each row of data.
>
> Also, the <itemtemplate > defines an imagebutton.
>
> I want to be able (for each item) to choose something
> from the radiobuttonlist and then click the imagebutton
> to submit to another page.
>
> I've found that I can use FindControl() in the
> ItemCreated event handler for the DataList to *find*

the
> control itself, however, that isn't my problem.
>
> My problem is in the OnClick event handler for the
> imagebutton for each item, I'm unable to access the
> radiobuttonlist selected item!
>
> How is this done? What's the cleanest, simplest way to
> get access and fire events from nested controls like

this?
>
> Thanks!

.


Nov 18 '05 #5

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

Similar topics

1
3695
by: Phil Townsend | last post by:
I want to add a datalist to a Repeater control. The data for the datalist resides in a cached DataSet that contains two related tables. The data in last child table should be rendered in three columns, so I have decided on a DataList control for this purpose. A repeater will render values from the parent table. I am attempting to call the ItemDataBound event of the Repeater control to build a DataList and render it to the page. I have...
1
368
by: V. Jenks | last post by:
What seems like a simple thing is apparently not so straightforward? I have a datalist. Inside of that datalist is an <itemtemplate> secion which contains other server controls such as a label, a radiobuttonlist, etc. I'm driving myself insane trying to figure out how to get
3
1999
by: Derek | last post by:
I have a nested datalist with a dropdownlist. I need to capture the selectedvalue of the dropdownlist so I can update a database table. My question then is...how do I get the value from the nested datalist? Thanks for any help.
3
19341
by: Martin | last post by:
Hi, I have a very frustrating problem that I have researched for countless hours to no avail. There are many posts asking very similar things, however none usefull in my situation. I am using VS 2005 (ASP 2.0) and VB .NET. I have a page with a datalist, a gridview and then other data controls, nested in that order. This all works great, and produces a nice looking page, but I cannot for the life of me figure out how to reference
3
1701
by: Jon Paal | last post by:
how do I load controls to the templates for the DataList control. <asp:datalist id="dl1" runat="server" > <ItemTemplate> " how to load control(s) here ????" </ItemTemplate> </asp:datalist>
0
1848
by: H5N1 | last post by:
Hi there My problem is that in when I update GridView row, which is nested into DataList control, I want to refresh also DataList in which the GridView is nested, since after update, trigger in my DB changes some value in it (some Total sum from the GridView column). The GridView, along with its ObjectDataSource is inserted into DataList ItemTemplate.
2
6964
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of attending interviews. If you own a company best way to judge if the candidate is worth of it. http://www.questpond.com/InterviewRatingSheet.zip
2
2392
by: Ole V.-M. | last post by:
Greetings, i have a UserControl, that contains a DataList. That DataList contains as items other DataLists. example: DataList A Row 1 Nested DataList 1 Row 1
0
8969
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9479
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9266
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9209
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8215
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6054
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4826
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3280
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.