For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > March 2008 > Working with controls inside a repeater









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Working with controls inside a repeater
Øyvind Isaksen

2008-03-30, 5:15 am

I need to know how to handle controls inside a repeater, how to send and
recieve data from another page to one spesific control inside a repeater.

Clue:
I have a repeater that dynamicly lists out different kind of webcontrols
(based on some criterias). Each textboxes inside the repeater need to have a
"browse" button, when clicking that button another page shall open (popup)
and the user can bwrowse for some content to insert. When clicking "ok" in
the poput, the content (from a textbox) shall be inserted into the textbox
in the repeater.

Example:
Textbox 1 - button 1
Textbox 2 - button 2
Textbox 3 - button 3
..
..
..

If I click "button 1", a popup is opened and I can fill in a url path in a
textbox. When clicking "ok" in that popup I shall return to my repeater page
and the content shall be inserted into textbox1. If I click button 2, the
content shall be inserted into textbox 2 and so on...

This seems to be very hard to make, does anybody have some examples how to
do this? Please :)


<asp:Repeater runat="server" ID="repAttributes">
<ItemTemplate>

<asp:TextBox runat="server" ID="txtImageUrl" width="650px" />
<asp:Button runat="server" ID="btnImageUrl" Text="Browse" />

</ItemTemplate>
</asp:Repeater>



Øyvind Isaksen

2008-03-30, 9:58 pm

I got it solved by using ClientId code behind.


"Øyvind Isaksen" <oyvind@webressurs.no> wrote in message
news:%23jZNIOkkIHA.6032@TK2MSFTNGP03.phx.gbl...
>I need to know how to handle controls inside a repeater, how to send and
>recieve data from another page to one spesific control inside a repeater.
>
> Clue:
> I have a repeater that dynamicly lists out different kind of webcontrols
> (based on some criterias). Each textboxes inside the repeater need to have
> a "browse" button, when clicking that button another page shall open
> (popup) and the user can bwrowse for some content to insert. When clicking
> "ok" in the poput, the content (from a textbox) shall be inserted into the
> textbox in the repeater.
>
> Example:
> Textbox 1 - button 1
> Textbox 2 - button 2
> Textbox 3 - button 3
> .
> .
> .
>
> If I click "button 1", a popup is opened and I can fill in a url path in a
> textbox. When clicking "ok" in that popup I shall return to my repeater
> page and the content shall be inserted into textbox1. If I click button 2,
> the content shall be inserted into textbox 2 and so on...
>
> This seems to be very hard to make, does anybody have some examples how to
> do this? Please :)
>
>
> <asp:Repeater runat="server" ID="repAttributes">
> <ItemTemplate>
>
> <asp:TextBox runat="server" ID="txtImageUrl" width="650px" />
> <asp:Button runat="server" ID="btnImageUrl" Text="Browse" />
>
> </ItemTemplate>
> </asp:Repeater>
>
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com