473,735 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Custom control within repeater with custom object binding - .net 1

my aspx has something like this

<asp:Repeater id="Repeater1" runat="server">
<ItemTemplate >
<mycontrol:ct l id="ctlId" obj='<%# Container.DataI tem %>'
showItem="true"/>
</ItemTemplate>
/asp:Repeater>

The DataSource for this Repeater is a CollectionBase of objects and is
assigned and bound on Page_Load.

Now I have a Calendar control that fires a SelectionChange d. I want that to
crate a new Collection of objects based on the selected date and rebound.
However it doesn't seem to keep the Container.DataI tem. The control shows a
null object however the static fields are passed (i.e. the showPass shows
"true" when debugging).

What am I doing wrong? Any help would be much appreciated.

Feb 16 '06 #1
9 4688
Let me clarify.. my SelectionChange d method has

db = new dbHelper();
Repeater1.DataS ource = db.GetObjects() ;
Repeater1.DataB ind()

This doesn't work.

"Jaybuffet" wrote:
my aspx has something like this

<asp:Repeater id="Repeater1" runat="server">
<ItemTemplate >
<mycontrol:ct l id="ctlId" obj='<%# Container.DataI tem %>'
showItem="true"/>
</ItemTemplate>
/asp:Repeater>

The DataSource for this Repeater is a CollectionBase of objects and is
assigned and bound on Page_Load.

Now I have a Calendar control that fires a SelectionChange d. I want that to
crate a new Collection of objects based on the selected date and rebound.
However it doesn't seem to keep the Container.DataI tem. The control shows a
null object however the static fields are passed (i.e. the showPass shows
"true" when debugging).

What am I doing wrong? Any help would be much appreciated.

Feb 16 '06 #2
I'm new to the newsgroups, do questions get answered usually here or is there
a more active site i should try posting to?

Thanks you

"Jaybuffet" wrote:
my aspx has something like this

<asp:Repeater id="Repeater1" runat="server">
<ItemTemplate >
<mycontrol:ct l id="ctlId" obj='<%# Container.DataI tem %>'
showItem="true"/>
</ItemTemplate>
/asp:Repeater>

The DataSource for this Repeater is a CollectionBase of objects and is
assigned and bound on Page_Load.

Now I have a Calendar control that fires a SelectionChange d. I want that to
crate a new Collection of objects based on the selected date and rebound.
However it doesn't seem to keep the Container.DataI tem. The control shows a
null object however the static fields are passed (i.e. the showPass shows
"true" when debugging).

What am I doing wrong? Any help would be much appreciated.

Feb 16 '06 #3
Questions get answered fairly quickly here. Your question however has a few
ambiguities:

1- when you say "However it doesn't seem to keep the Container.DataI tem" you
did not clarify what are you referring to. If you are referring to the
Calender that is within the RepeaterItem then what method are you using and
in which event are you attempting to get the DataItem?

2- when you say "The control shows a null object however the static fields
are passed (i.e. the showPass shows "true" when debugging)." Which control
are you referring to that has a null value? What are “static fields"? And
what is "showPass"? Is "showPass" a customized property of your control?

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Jaybuffet" wrote:
I'm new to the newsgroups, do questions get answered usually here or is there
a more active site i should try posting to?

Thanks you

"Jaybuffet" wrote:
my aspx has something like this

<asp:Repeater id="Repeater1" runat="server">
<ItemTemplate >
<mycontrol:ct l id="ctlId" obj='<%# Container.DataI tem %>'
showItem="true"/>
</ItemTemplate>
/asp:Repeater>

The DataSource for this Repeater is a CollectionBase of objects and is
assigned and bound on Page_Load.

Now I have a Calendar control that fires a SelectionChange d. I want that to
crate a new Collection of objects based on the selected date and rebound.
However it doesn't seem to keep the Container.DataI tem. The control shows a
null object however the static fields are passed (i.e. the showPass shows
"true" when debugging).

What am I doing wrong? Any help would be much appreciated.

Feb 16 '06 #4
Not sure if this is correct but this is how i ended up fixing it... don't
know if its a kludge, but it seems to work.. On initial page load it sets
the obj property twice however, but oh well.

in repeater_itemcr eated i put if((e.Item.Cont rols.Count>1) &&
(e.Item.Control s[1].GetType().Name =="mycontrol.as cx"))
((mycontrol)e.I tem.Controls[1]).obj = (obj)e.Item.Dat aItem;

To answer your questions so maybe i can get a better solution:

Calendar is elsewhere on the page, not in a repeater. There was a typo, i
didn't mean "showPass", i meant "showItem", as the code snippet has and yes
it is a property on my ascx.

When i debug the property that sets the "obj" and I step through, the
initial page load works great. I set the repeater datasource to a collection
of objects then bind. When a breakpoint is set on the set method in the
"obj" property it is triggered on initial page_load, however, after i select
a date and then in calendar_select ionchanged i select a different datasource
(filtered based on the day) and then bind, it never reaches that breakpoint.

Don't know if i am explaing this correctly, but i am trying.

Thank you for your help!!

"Phillip Williams" wrote:
Questions get answered fairly quickly here. Your question however has a few
ambiguities:

1- when you say "However it doesn't seem to keep the Container.DataI tem" you
did not clarify what are you referring to. If you are referring to the
Calender that is within the RepeaterItem then what method are you using and
in which event are you attempting to get the DataItem?

2- when you say "The control shows a null object however the static fields
are passed (i.e. the showPass shows "true" when debugging)." Which control
are you referring to that has a null value? What are “static fields"? And
what is "showPass"? Is "showPass" a customized property of your control?

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Jaybuffet" wrote:
I'm new to the newsgroups, do questions get answered usually here or is there
a more active site i should try posting to?

Thanks you

"Jaybuffet" wrote:
my aspx has something like this

<asp:Repeater id="Repeater1" runat="server">
<ItemTemplate >
<mycontrol:ct l id="ctlId" obj='<%# Container.DataI tem %>'
showItem="true"/>
</ItemTemplate>
/asp:Repeater>

The DataSource for this Repeater is a CollectionBase of objects and is
assigned and bound on Page_Load.

Now I have a Calendar control that fires a SelectionChange d. I want that to
crate a new Collection of objects based on the selected date and rebound.
However it doesn't seem to keep the Container.DataI tem. The control shows a
null object however the static fields are passed (i.e. the showPass shows
"true" when debugging).

What am I doing wrong? Any help would be much appreciated.

Feb 16 '06 #5
If I create a demo that matches the description that you posted I do not get
the problem that you got. Here is the demo:
http://www.webswapp.com/demos/feb162006.aspx

The problem you got could have happened if you had added your custom control
to the page programmaticall y (instead of declaratively as you posted below).

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Jaybuffet" wrote:
Not sure if this is correct but this is how i ended up fixing it... don't
know if its a kludge, but it seems to work.. On initial page load it sets
the obj property twice however, but oh well.

in repeater_itemcr eated i put if((e.Item.Cont rols.Count>1) &&
(e.Item.Control s[1].GetType().Name =="mycontrol.as cx"))
((mycontrol)e.I tem.Controls[1]).obj = (obj)e.Item.Dat aItem;

To answer your questions so maybe i can get a better solution:

Calendar is elsewhere on the page, not in a repeater. There was a typo, i
didn't mean "showPass", i meant "showItem", as the code snippet has and yes
it is a property on my ascx.

When i debug the property that sets the "obj" and I step through, the
initial page load works great. I set the repeater datasource to a collection
of objects then bind. When a breakpoint is set on the set method in the
"obj" property it is triggered on initial page_load, however, after i select
a date and then in calendar_select ionchanged i select a different datasource
(filtered based on the day) and then bind, it never reaches that breakpoint.

Don't know if i am explaing this correctly, but i am trying.

Thank you for your help!!

"Phillip Williams" wrote:
Questions get answered fairly quickly here. Your question however has a few
ambiguities:

1- when you say "However it doesn't seem to keep the Container.DataI tem" you
did not clarify what are you referring to. If you are referring to the
Calender that is within the RepeaterItem then what method are you using and
in which event are you attempting to get the DataItem?

2- when you say "The control shows a null object however the static fields
are passed (i.e. the showPass shows "true" when debugging)." Which control
are you referring to that has a null value? What are “static fields"? And
what is "showPass"? Is "showPass" a customized property of your control?

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Jaybuffet" wrote:
I'm new to the newsgroups, do questions get answered usually here or is there
a more active site i should try posting to?

Thanks you

"Jaybuffet" wrote:

> my aspx has something like this
>
> <asp:Repeater id="Repeater1" runat="server">
> <ItemTemplate >
> <mycontrol:ct l id="ctlId" obj='<%# Container.DataI tem %>'
> showItem="true"/>
> </ItemTemplate>
> /asp:Repeater>
>
> The DataSource for this Repeater is a CollectionBase of objects and is
> assigned and bound on Page_Load.
>
> Now I have a Calendar control that fires a SelectionChange d. I want that to
> crate a new Collection of objects based on the selected date and rebound.
> However it doesn't seem to keep the Container.DataI tem. The control shows a
> null object however the static fields are passed (i.e. the showPass shows
> "true" when debugging).
>
> What am I doing wrong? Any help would be much appreciated.
>

Feb 16 '06 #6
Was this im ASP.NET 1.1? It seems like how i have (except the user control,
I set label values in Page_Load). But that doesn't seem to matter because
when stepping through i never get to the Set call.

"Phillip Williams" wrote:
If I create a demo that matches the description that you posted I do not get
the problem that you got. Here is the demo:
http://www.webswapp.com/demos/feb162006.aspx

The problem you got could have happened if you had added your custom control
to the page programmaticall y (instead of declaratively as you posted below).

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Jaybuffet" wrote:
Not sure if this is correct but this is how i ended up fixing it... don't
know if its a kludge, but it seems to work.. On initial page load it sets
the obj property twice however, but oh well.

in repeater_itemcr eated i put if((e.Item.Cont rols.Count>1) &&
(e.Item.Control s[1].GetType().Name =="mycontrol.as cx"))
((mycontrol)e.I tem.Controls[1]).obj = (obj)e.Item.Dat aItem;

To answer your questions so maybe i can get a better solution:

Calendar is elsewhere on the page, not in a repeater. There was a typo, i
didn't mean "showPass", i meant "showItem", as the code snippet has and yes
it is a property on my ascx.

When i debug the property that sets the "obj" and I step through, the
initial page load works great. I set the repeater datasource to a collection
of objects then bind. When a breakpoint is set on the set method in the
"obj" property it is triggered on initial page_load, however, after i select
a date and then in calendar_select ionchanged i select a different datasource
(filtered based on the day) and then bind, it never reaches that breakpoint.

Don't know if i am explaing this correctly, but i am trying.

Thank you for your help!!

"Phillip Williams" wrote:
Questions get answered fairly quickly here. Your question however has a few
ambiguities:

1- when you say "However it doesn't seem to keep the Container.DataI tem" you
did not clarify what are you referring to. If you are referring to the
Calender that is within the RepeaterItem then what method are you using and
in which event are you attempting to get the DataItem?

2- when you say "The control shows a null object however the static fields
are passed (i.e. the showPass shows "true" when debugging)." Which control
are you referring to that has a null value? What are “static fields"? And
what is "showPass"? Is "showPass" a customized property of your control?

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Jaybuffet" wrote:

> I'm new to the newsgroups, do questions get answered usually here or is there
> a more active site i should try posting to?
>
> Thanks you
>
> "Jaybuffet" wrote:
>
> > my aspx has something like this
> >
> > <asp:Repeater id="Repeater1" runat="server">
> > <ItemTemplate >
> > <mycontrol:ct l id="ctlId" obj='<%# Container.DataI tem %>'
> > showItem="true"/>
> > </ItemTemplate>
> > /asp:Repeater>
> >
> > The DataSource for this Repeater is a CollectionBase of objects and is
> > assigned and bound on Page_Load.
> >
> > Now I have a Calendar control that fires a SelectionChange d. I want that to
> > crate a new Collection of objects based on the selected date and rebound.
> > However it doesn't seem to keep the Container.DataI tem. The control shows a
> > null object however the static fields are passed (i.e. the showPass shows
> > "true" when debugging).
> >
> > What am I doing wrong? Any help would be much appreciated.
> >

Feb 18 '06 #7
That might be the problem. It seems on initial load in sets the obj property
and all other properties before Page_Load on the control. But after i change
the month it then does the user controls Page_Load first, then sets the
properties. What am i missing?

"Phillip Williams" wrote:
If I create a demo that matches the description that you posted I do not get
the problem that you got. Here is the demo:
http://www.webswapp.com/demos/feb162006.aspx

The problem you got could have happened if you had added your custom control
to the page programmaticall y (instead of declaratively as you posted below).

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Jaybuffet" wrote:
Not sure if this is correct but this is how i ended up fixing it... don't
know if its a kludge, but it seems to work.. On initial page load it sets
the obj property twice however, but oh well.

in repeater_itemcr eated i put if((e.Item.Cont rols.Count>1) &&
(e.Item.Control s[1].GetType().Name =="mycontrol.as cx"))
((mycontrol)e.I tem.Controls[1]).obj = (obj)e.Item.Dat aItem;

To answer your questions so maybe i can get a better solution:

Calendar is elsewhere on the page, not in a repeater. There was a typo, i
didn't mean "showPass", i meant "showItem", as the code snippet has and yes
it is a property on my ascx.

When i debug the property that sets the "obj" and I step through, the
initial page load works great. I set the repeater datasource to a collection
of objects then bind. When a breakpoint is set on the set method in the
"obj" property it is triggered on initial page_load, however, after i select
a date and then in calendar_select ionchanged i select a different datasource
(filtered based on the day) and then bind, it never reaches that breakpoint.

Don't know if i am explaing this correctly, but i am trying.

Thank you for your help!!

"Phillip Williams" wrote:
Questions get answered fairly quickly here. Your question however has a few
ambiguities:

1- when you say "However it doesn't seem to keep the Container.DataI tem" you
did not clarify what are you referring to. If you are referring to the
Calender that is within the RepeaterItem then what method are you using and
in which event are you attempting to get the DataItem?

2- when you say "The control shows a null object however the static fields
are passed (i.e. the showPass shows "true" when debugging)." Which control
are you referring to that has a null value? What are “static fields"? And
what is "showPass"? Is "showPass" a customized property of your control?

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Jaybuffet" wrote:

> I'm new to the newsgroups, do questions get answered usually here or is there
> a more active site i should try posting to?
>
> Thanks you
>
> "Jaybuffet" wrote:
>
> > my aspx has something like this
> >
> > <asp:Repeater id="Repeater1" runat="server">
> > <ItemTemplate >
> > <mycontrol:ct l id="ctlId" obj='<%# Container.DataI tem %>'
> > showItem="true"/>
> > </ItemTemplate>
> > /asp:Repeater>
> >
> > The DataSource for this Repeater is a CollectionBase of objects and is
> > assigned and bound on Page_Load.
> >
> > Now I have a Calendar control that fires a SelectionChange d. I want that to
> > crate a new Collection of objects based on the selected date and rebound.
> > However it doesn't seem to keep the Container.DataI tem. The control shows a
> > null object however the static fields are passed (i.e. the showPass shows
> > "true" when debugging).
> >
> > What am I doing wrong? Any help would be much appreciated.
> >

Feb 18 '06 #8
Any ideas on how to make this work with the setting of control properties in
the Page_Load. Try adding another property to the control that is a bool and
then setting visibility on part of the control based on that property with
the object binding still. Does it make a difference if I am doing this in C#
with codebehind. I tried modifiying your example to

<script language="VB" runat="server">
Private _obj as ArrayList

Public Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s)
label1.Text = _obj.Item(0)
Label2.Text = _obj.Item(1)
Label3.Text = _obj.Item(2)

End Sub

Public WriteOnly Property obj() As ArrayList
Set(ByVal Value As ArrayList)
_obj = Value

End Set
End Property
</script>

but it never does the Page_Load, but in my project it does.

Thanks for your help.

"Phillip Williams" wrote:
If I create a demo that matches the description that you posted I do not get
the problem that you got. Here is the demo:
http://www.webswapp.com/demos/feb162006.aspx

The problem you got could have happened if you had added your custom control
to the page programmaticall y (instead of declaratively as you posted below).

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Jaybuffet" wrote:
Not sure if this is correct but this is how i ended up fixing it... don't
know if its a kludge, but it seems to work.. On initial page load it sets
the obj property twice however, but oh well.

in repeater_itemcr eated i put if((e.Item.Cont rols.Count>1) &&
(e.Item.Control s[1].GetType().Name =="mycontrol.as cx"))
((mycontrol)e.I tem.Controls[1]).obj = (obj)e.Item.Dat aItem;

To answer your questions so maybe i can get a better solution:

Calendar is elsewhere on the page, not in a repeater. There was a typo, i
didn't mean "showPass", i meant "showItem", as the code snippet has and yes
it is a property on my ascx.

When i debug the property that sets the "obj" and I step through, the
initial page load works great. I set the repeater datasource to a collection
of objects then bind. When a breakpoint is set on the set method in the
"obj" property it is triggered on initial page_load, however, after i select
a date and then in calendar_select ionchanged i select a different datasource
(filtered based on the day) and then bind, it never reaches that breakpoint.

Don't know if i am explaing this correctly, but i am trying.

Thank you for your help!!

"Phillip Williams" wrote:
Questions get answered fairly quickly here. Your question however has a few
ambiguities:

1- when you say "However it doesn't seem to keep the Container.DataI tem" you
did not clarify what are you referring to. If you are referring to the
Calender that is within the RepeaterItem then what method are you using and
in which event are you attempting to get the DataItem?

2- when you say "The control shows a null object however the static fields
are passed (i.e. the showPass shows "true" when debugging)." Which control
are you referring to that has a null value? What are “static fields"? And
what is "showPass"? Is "showPass" a customized property of your control?

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Jaybuffet" wrote:

> I'm new to the newsgroups, do questions get answered usually here or is there
> a more active site i should try posting to?
>
> Thanks you
>
> "Jaybuffet" wrote:
>
> > my aspx has something like this
> >
> > <asp:Repeater id="Repeater1" runat="server">
> > <ItemTemplate >
> > <mycontrol:ct l id="ctlId" obj='<%# Container.DataI tem %>'
> > showItem="true"/>
> > </ItemTemplate>
> > /asp:Repeater>
> >
> > The DataSource for this Repeater is a CollectionBase of objects and is
> > assigned and bound on Page_Load.
> >
> > Now I have a Calendar control that fires a SelectionChange d. I want that to
> > crate a new Collection of objects based on the selected date and rebound.
> > However it doesn't seem to keep the Container.DataI tem. The control shows a
> > null object however the static fields are passed (i.e. the showPass shows
> > "true" when debugging).
> >
> > What am I doing wrong? Any help would be much appreciated.
> >

Feb 20 '06 #9
Ok, now I understand the problem that you have. Let me continue to use the
sample that I put on my website to explain the issue that you described.

1- The page_load event did not fire when you added it to my sample because
the control tag of my sample had the AutoEventWireUp = "false". To have
your modification that you added to the page_load working turn the
AutoEventWireUp to true.

2- Control load event fires after the web page Load event. This means that
when you request the page first time, the Page_load (of the main page) is
triggered, the data is composed and the Control is databound to the
arraylist. Then the Control's load event fires up and the repeater is
populated.

3- Upon postback, the Page_load event is fired but because I have a
condition If Not Page.IsPostBack Then do not load the data, the Control's
Load event is fired but there is no data. Then the
Calender.Select ionChanged event is fired, it populates the data but it does
not databind because you moved the databinding to the Page_Load which
happened earlier that than the data became available.

In other words, you got to pay attention to the sequence of events. Instead
of databinding upon page load, databind upon setting the obj value of the
child control.

---
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com

"Jaybuffet" <Ja*******@disc ussions.microso ft.com> wrote:
Any ideas on how to make this work with the setting of control properties in the Page_Load. Try adding another property to the control that is a bool and then setting visibility on part of the control based on that property with
the object binding still. Does it make a difference if I am doing this in C# with codebehind. I tried modifiying your example to

<script language="VB" runat="server">
Private _obj as ArrayList

Public Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s)
label1.Text = _obj.Item(0)
Label2.Text = _obj.Item(1)
Label3.Text = _obj.Item(2)

End Sub

Public WriteOnly Property obj() As ArrayList
Set(ByVal Value As ArrayList)
_obj = Value

End Set
End Property
</script>

but it never does the Page_Load, but in my project it does.

Thanks for your help.

"Phillip Williams" wrote:
If I create a demo that matches the description that you posted I do not get the problem that you got. Here is the demo:
http://www.webswapp.com/demos/feb162006.aspx

The problem you got could have happened if you had added your custom control to the page programmaticall y (instead of declaratively as you posted below).
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Jaybuffet" wrote:
Not sure if this is correct but this is how i ended up fixing it... don't know if its a kludge, but it seems to work.. On initial page load it sets the obj property twice however, but oh well.

in repeater_itemcr eated i put if((e.Item.Cont rols.Count>1) &&
(e.Item.Control s[1].GetType().Name =="mycontrol.as cx"))
((mycontrol)e.I tem.Controls[1]).obj = (obj)e.Item.Dat aItem;

To answer your questions so maybe i can get a better solution:

Calendar is elsewhere on the page, not in a repeater. There was a typo, i didn't mean "showPass", i meant "showItem", as the code snippet has and yes it is a property on my ascx.

When i debug the property that sets the "obj" and I step through, the
initial page load works great. I set the repeater datasource to a collection of objects then bind. When a breakpoint is set on the set method in the "obj" property it is triggered on initial page_load, however, after i select a date and then in calendar_select ionchanged i select a different datasource (filtered based on the day) and then bind, it never reaches that breakpoint.
Don't know if i am explaing this correctly, but i am trying.

Thank you for your help!!

"Phillip Williams" wrote:

> Questions get answered fairly quickly here. Your question however has a few > ambiguities:
>
> 1- when you say "However it doesn't seem to keep the Container.DataI tem" you > did not clarify what are you referring to. If you are referring to the > Calender that is within the RepeaterItem then what method are you using and > in which event are you attempting to get the DataItem?
>
> 2- when you say "The control shows a null object however the static fields > are passed (i.e. the showPass shows "true" when debugging)." Which control > are you referring to that has a null value? What are "static fields"? And > what is "showPass"? Is "showPass" a customized property of your control? >
> --
> HTH,
> Phillip Williams
> http://www.societopia.net
> http://www.webswapp.com
>
>
> "Jaybuffet" wrote:
>
> > I'm new to the newsgroups, do questions get answered usually here or is there > > a more active site i should try posting to?
> >
> > Thanks you
> >
> > "Jaybuffet" wrote:
> >
> > > my aspx has something like this
> > >
> > > <asp:Repeater id="Repeater1" runat="server">
> > > <ItemTemplate >
> > > <mycontrol:ct l id="ctlId" obj='<%# Container.DataI tem %>'
> > > showItem="true"/>
> > > </ItemTemplate>
> > > /asp:Repeater>
> > >
> > > The DataSource for this Repeater is a CollectionBase of objects and is > > > assigned and bound on Page_Load.
> > >
> > > Now I have a Calendar control that fires a SelectionChange d. I want that to > > > crate a new Collection of objects based on the selected date and rebound. > > > However it doesn't seem to keep the Container.DataI tem. The control shows a > > > null object however the static fields are passed (i.e. the showPass shows > > > "true" when debugging).
> > >
> > > What am I doing wrong? Any help would be much appreciated.
> > >

Feb 21 '06 #10

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

Similar topics

3
2737
by: anon | last post by:
I am having a hard time with makeing what I am trying to do work. I am making a questionaire web app. I have a custom control that has a label and 5 radio buttons. My problem is that each different topic for the questionaire is in a database and each questionaire will have a different number of questions. I am trying to use a repeater to creat multiple copies of the control, unfortunately when I do this the different controls act like...
2
11790
by: Thomas R | last post by:
Is is possible? In VS.NET 2003, Binding data to the repeater is easy, but when I try to add an ASP:checkbox to the .aspx page, the designer won't recognize it, hence the code view doesn't allow me to access it. The funny thing is that it compiles fine, and the checkboxes are there, I just can't write to them! Is there a way around this problem? My HTML is as follows:
1
1341
by: Arsen V. | last post by:
Hello, How to control the structure of the HTML inside of the ItemTemplate of the Repeater? For example, if a certain data column value is empty (or contains some specific string or number), I want to be able to "hide" a part of the HTML of the ItemTemplate. Say a customer has phone number and extension. The extension is optional.
3
2862
by: WebMatrix | last post by:
I am struggling with implementing somewhat complicated UI web-control. I explored Repeater, but I am not sure if it's the best way to go. I am leaning towards writing my own custom control and creating elements on the fly dynamically. I have a control that needs to display 3 columns and n number of rows depending on number of records. Sounds simple. But each Row has a control with its own data source binding and value must be selected...
1
5445
by: olduncleamos | last post by:
Hello all, I am experimenting with the repeater control and ran into something that I wasn't expecting. I would appreciate if the experts can confirm or correct my understanding. Here is a fragment of a very simple page that I wrote that will drill down into the displayed item. The result is to be display on the same page so that the user can keep on drilling down:
1
6427
by: ratnakarp | last post by:
Hi, I have a search text box. The user enters the value in the text box and click on enter button. In code behind on button click i'm writing the code to get the values from the database and binding it to a repeater control. This repeater control has multiple text boxes and buttons. Can you please tell me how can i do paging in this case ? I'm posting my code below. The problem is that if i click on "AdjustThisAd" button, it opens...
8
3024
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the way I'm going about doing this might be a little off. I'd appreciate some help. Below is the code I have thus far but I'm not sure how to reference the user control within the foreach loop. <asp:Panel ID="pnlRosterProfile" runat="Server" />
14
14653
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control so I get the ObjectDataSource. No problem ..... ObjectDataSource src = .... //is ok i have it
0
1970
by: ChopStickr | last post by:
I have a custom control that is embedded (using the object tag) in an html document. The control takes a path to a local client ini file. Reads the file. Executes the program specified in the ini on the client's PC. After the program has ended the control looks in a client side temp folder (specified by the ini file) for an image created by the executed program. If the image is there, then the control moves the file to a public folder...
0
8964
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9466
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...
0
9327
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9253
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
9201
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
4564
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
4823
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3277
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
2
2740
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.