Hello,
I have an interesting problem.
I wish to show a set of controls on a form repeatedly. Sort of like an
ASP.Net repeated, but without any data binding (I want to be able to put in
the data myself.
Basically, I am making a website which takes an RSS feed, and shows a list
of posts in the feed. Like Google reader. I want to to use ASP.Net Ajax
controls in the content, so I can't make a loop and spew pure HTML. I need
to use the actual controls, with the events and everything, and I don't want
to put in 50 controls on the form.
Is there any way to put all those controls on the form through code,
automatically?
Thank for any leads/ideas that you can give me.
Regards
Cyril 2 1175
"Cyril Gupta | सिरिल गुप्ता" <cy********@gmail.comwrote in message
news:86**********************************@microsof t.com...
Hello,
I have an interesting problem.
I wish to show a set of controls on a form repeatedly. Sort of like an
ASP.Net repeated, but without any data binding (I want to be able to put
in the data myself.
Basically, I am making a website which takes an RSS feed, and shows a list
of posts in the feed. Like Google reader. I want to to use ASP.Net Ajax
controls in the content, so I can't make a loop and spew pure HTML. I need
to use the actual controls, with the events and everything, and I don't
want to put in 50 controls on the form.
Is there any way to put all those controls on the form through code,
automatically?
Thank for any leads/ideas that you can give me.
Regards
Cyril
Use a repeater. Within the repeater you will define the set of controls for
each post. You then create a collection of posts from the RSS feed and
databind that collection to the repeater. You can use the <%# Eval("Name")
%format in the controls within the repeater but I find that handling the
ItemDataBound event will allow more flexibilty.
There is a starter kit which has a module for RSS feeds http://www.codeplex.com/ASPNETPortal which might get you started.
Hope this helps
LLoyd SHeen
Hello Lloyd,
Thank you for the tip. Using a collection to databind is a good idea.
Meanwhile I've re-invented the wheel... I created a asp.net control to hold
my template, and then added a number of these controls to a panel.
Guess using a repeated is much easier! I will just check if I should trash
my code :)
Thanks
Cyril Gupta
"Lloyd Sheen" <a@b.cwrote in message
news:et*************@TK2MSFTNGP06.phx.gbl...
>
"Cyril Gupta | सिरिल गुप्ता" <cy********@gmail.comwrote in message
news:86**********************************@microsof t.com...
>Hello,
I have an interesting problem.
I wish to show a set of controls on a form repeatedly. Sort of like an ASP.Net repeated, but without any data binding (I want to be able to put in the data myself.
Basically, I am making a website which takes an RSS feed, and shows a list of posts in the feed. Like Google reader. I want to to use ASP.Net Ajax controls in the content, so I can't make a loop and spew pure HTML. I need to use the actual controls, with the events and everything, and I don't want to put in 50 controls on the form.
Is there any way to put all those controls on the form through code, automatically?
Thank for any leads/ideas that you can give me.
Regards Cyril
Use a repeater. Within the repeater you will define the set of controls
for each post. You then create a collection of posts from the RSS feed
and databind that collection to the repeater. You can use the <%#
Eval("Name") %format in the controls within the repeater but I find that
handling the ItemDataBound event will allow more flexibilty.
There is a starter kit which has a module for RSS feeds http://www.codeplex.com/ASPNETPortal which might get you started.
Hope this helps
LLoyd SHeen
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Georg Scholz |
last post by:
Hello,
The class "Control" contains a documented Property "ControlType".
So for example, in a form, you can write code like this:
Dim c as control
set c = me.Controls("textbox1")
if...
|
by: Tim Geiges |
last post by:
Since I am being challenged with learning c# I figured I could pass
some of the pain on to you guys :-)
I have another question(this one is important for me to fix before I
can get my app to Beta)...
|
by: hn |
last post by:
Hi all,
I have to design a quiz page which includes up to 200 questions. What users
do is they start the quiz, go to page1 with question1, enter some answers,
click next to go page2 with...
|
by: Wardeaux |
last post by:
All,
looking for sample project on how to add/edit/delete controls from an aspx
page at runtime... any pointers is most appreciated!!
My controls are simple: Label, Textbox, and DropList... I only...
|
by: dje |
last post by:
In the OnClick event on a radioButtonList, I run a javascript to
show/hide the appropriate div along with a submit button, which
displays as expected. The problem is the submit no longer works on...
|
by: Chris |
last post by:
Hi,
What is wrong with this code? I can't figure this out. Its suppose to display
..a bunch
..of errors
on my page. I am stuck for over 4 hrs now an this crap. Please assist.
This is on...
|
by: Joanne |
last post by:
Hi,
I have an "interesting" problem with UserControls in a datagrid and I'm
desperate for your help as I work alone and have no-one else to ask. It
is quite complicated but I'll try to keep it...
|
by: Miguel Dias Moura |
last post by:
Hello,
I have a GridView in my page which is created in runtime. It works fine.
My page has 2 Asp Buttons:
- The HIDE button makes GridView.Visible = False;
- The SHOW button makes...
|
by: Terry Olsen |
last post by:
I'm trying to add a domain user to a local group using the code below:
Dim LCL As New DirectoryEntry("WinNT://" + Environment.MachineName +
",computer")
Dim DOM As New...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
|
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...
| |