Finding LinkButton Control inside of Repeater control!!! Help

I have LinkButtons in which are placed inside of a repeater control. I am trying to be able to retrieve that linkbuttons .text value in a onclick event. 

Here is my HTML code:
            <asp:repeater id="topics" runat="server">
<asp:LinkButton id="TopicLink1"  OnClick="_TopicClick"  runat="server" >
<%# Container.DataItem( "name" ) %><%# Container.DataItem( "number" ) %>

Here is the <script> code I am trying to use to get the control. It compiles correctly, but when I click a LinkButton it does not print out any text.
Sub _TopicClick(sender As Object, e As System.EventArgs)

Dim myLink As LinkButton
mylink = CType(sender,LinkButton)

Dim myLink2 As LinkButton
myLink2 = CType(mylink.parent.FindControl("TopicLink1"), LinkButton)


End Sub

Visit #1 Windows Vista Forum

1/18/2006 3:25:25 AM 72751 articles. 3 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 25

Anyone? Bump Please help

Visit #1 Windows Vista Forum

1/18/2006 3:53:43 PM

Similar Artilces:

Help Req: !!! :- On Disabling Controls Present inside a Gridview control
Hi All, We have A requirement Where we have disable controls inside a grid.These controls can be textbox, DropDownlist (in TemplateField), ComandField present inside the grid.We have to call a generic method for doing the same .(since it can be done for multiple grid.) PFB the code snippet we use. Which disables all the controls inside the page.The bolded part of the code is used to loop inside a grid view.(Not Working.)Is this ideal way to deal with the requirement.Or can someone suggest be a better way.        public void DisableMe(Page p1, st...

Calendar Control inside Repeater, Handling Child control events in parent Data Control
Hi all,I've been researching a problem i have for a couple of days now and i'm still not sure how to even start to handle it.I'm essentially trying to build a page that will display custom form fields/controls for individual items/rows inside a repeater.I've got a fairly complex calendar i need to have working inside each individual row of the Repeater. The calendar is set up to fire the following events: OnDayRender="Calendar2_DayRender" OnSelectionChanged="Calendar2_SelectionChanged" OnVisibleMonthChanged="Calendar2_VisibleMonthChanged"My first question is how do i go about handling these...

Need help binding data to GridView control inside a Repeater control
Hi, How do I bind data to a GridView control that is inside a Repeater control?Thanks,Sam Looks like I bind the data to the Repeater control then handle binding individual sets of data to GridViews in the Repeater's OnItemDataBound event. Is this correct? If so, how do I pull the data back into DataTable in the OnItemDataBound event so that I can further process it i.e. slice it up so that I can bind it to multiple GridViews?Thanks,Sam Hi SamU, Yes, you can handle ItemDataBound event of Repeater to generate the data source of inner GridView. The data source (such as DataTable) of ...

How do i find the ID of a wizard control that was dynamically generated inside a repeater control?
Hello,  I have a list of wizard controls that is dynamically generated by a repeater control, and i was wondering if there is a way that i can find the control ID name for the wizard control so that i can update records to the database when i hit the next button.  Anyone know a way to do this?  -CraigI can do everything - I just havent figured out how yet... Try Control.ClientId or Control.IdPlease mark helpful posts as "Answer"...

how to find control inside a placeholder control ?
I have a table control named PrintTable, which is dynamically generated. I place it to a placeholder control (phPrintQ) on the page, and it renders well: phPrintQ.Controls.Add(PrintTable); However, when I want to retrieve the table control from the placeholder control (phPrintQ), I could not do it : Table t = (Table)phPrintQ.FindControl("PrintTable"); foreach (TableRow tr in t.Rows) { Response.Write(tr.Cells[0].Text);} This is the error message: Object reference not set to an instance of an object  on my foreach loop (t.Rows). Please help !!.. Thanks       ...

How to access a control inside a Repeater control?
 <asp:Repeater ID="Repeater1" runat="server"> <HeaderTemplate><ul></HeaderTemplate> <ItemTemplate><li><asp:Image id="Image1" runat="server" /> </li></ItemTemplate> <FooterTemplate></ul></FooterTemplate> </asp:Repeater>   Protected Sub Repeater1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles Repeater1.ItemDataBound Dim Image1 As WebControls.Image Image1 = CType(e.Item.FindCo...

How to find control inside ajax controls
1)First i have Tab Panel (tbPanel) 2)have a Grid View inside the Tab panel (grdView) 3) I have a panel with the text box (txtTest)   How to find the control of the text box      Try it through finding it through the event on the control the fires it the following example is of a dropdown list that's inside a gridview (grid view has a couple of update panels in it and thats why there are more than one parent). int selectedRow = ((sender as ListBox).Parent.Parent.Parent as GridViewRow).RowIndex;  this is on the SelectedIndexChanged of that dropdown &nbs...

Custom Control Inside a Repeater Control
I have a repeater control on the main page and would like to load a custom user control inside the repeater control. The custom user control is basically a GridView. A few values will need to be passed to the custom user control to define the where clause for the GridView DataSet. Can anyone provide me with or point me to a simple example of this functionality?Allan Horwitz Nevermind, I just put a GridView inside the Repeater Control tags and used the OnItemDataBound event to get the variables.Allan Horwitz...

Getting the control id of a control inside gridview control
 uhmm.. a little bit confusing regarding my subject because i dont know how to say the way my problem is how can i get the id of a control (e.g. textbox) inside the gridview... and the textbox is in the templatefield... is there any way i can get its id??  hoping i could get a reply as soon as possible... Regards,MhaeyPlease remember to click “Mark as Answer” on the post that helps you.. =) What do you want's to do by getting the id of the Text box? Do you want's to find particular Textbox with certain id ? Kamran ShahidSr. Software Engineer(MCP,,MC...

Custom Control within a Control Control
I am developing a custom controls that will render headers for different web sites. Within these controls, I want to place another custom control that will change the language. I created the language control and had it implement IPostBackDataHandler. This control works fine if I drag it on a new web form, but if I tell a header custom control to render it problems occur. The Language Selector custom control does not have a Page member anymore and the event handlers do not work. Does anyone have any experience with doing something similiar? Anyone have any suggestions? Thanks, ...

How do I control one control from another control?
I have a page page1.aspx which is within a master page. On page I have a table with two cells. Within each cell I have placed two controls (ascx) that I have developed. Now I'd like to be able to get these two controls to interact. One needs to update the other. One has some search criteria that the other one needs to update its gridview. One needs to make the other visible/not visible at certain times. Out of the box neither control can see each other at all. Is there a good article or someplace I can find some information on how to do this? Information Technolo...

Finding a control using find control
Hi I am using ajax to load different User controls in a page . When I am using FindControl method to get the reference to the update panel in the main page (i have a master page where script manager list located, then i have my main page which uses the master page and it only contains an update panel and content template(where user controls gets loaded). Inside and event handler of my user cotrol i tried to access the update panel using page.findcontrol(< ID of the update panel>) i got a null value . but when i searched the control hierarchy of the page . i find it(using watch) i...

Repeater control in another repeater control
Hi, I want Repeater control in another repeater control but it is not working Code : <asp:Repeater ID=CourseMaster Runat=server > <ItemTemplate> <table border=0 cellpadding=0 cellspacing=0 style="font-family:tahoma;font-size:12"> <tr> <td >&nbsp;<b</b></td> </tr> <tr> <td> <asp:repeater ID="CourseDetails" Runat=server> <ItemTemplate> <tab...

How to find Checkbox control inside ReorderList control
I have a Checkbox control inside of the ReorderList control, <ItemTemplate> area. How would I find the control to determine if that checkbox is checked and get the datakey for it? examples would be great. thanks! This works the same as it does with other repeaters.  If you get a reference to the data item (e.g. the row), you can do a FindControl("Checkbox1") or whatever. It's hard to give an example without some more context about what you are trying to accomplish, but say you want to get all of the Checkbox values in a button click or something:   protected v...

Web resources about - Finding LinkButton Control inside of Repeater control!!! Help -

Technology - BioLite Stove
Shop News FAQs CampStove HomeStove About Our Mission & Story Technology Contact Us Jobs BioLite Technology: Converting Waste Heat into Electricity ...

Flex Examples
Just a bunch of Adobe Books About Me About You Tags Links Flex 3 (Codename: Moxie) Flex 4 (Codename: Gumbo) Flex Hero Colophon Setting the icon ...

Health & Safety Watch - Food, Consumer Product, and Drug Real-time Recalls; Disease Outbreaks and Public ...
An innovative information service led by public health experts that provides critical real-time public health information tailored to the needs ...

Microfinance and microcredit
Information about microfinance and microcredit. Get the latest from the world of microfinance!

ButtonExtensions Module
AddConfirmation() This Extension Method extends the Button, ImageButton, and LinkButton by adding a JavaScript confirmation dialog that appears ...

Sell Your Item
Join your friends and neighbors in a gigantic online yard sale on Facebook.

Register for projects, internship, free lance job & outsourcing work.
For doing projects, internship, small job online - Enroll urself. Companies can get multiple project ideas from talented students at minimum ...

DropDown Sample
Samples HOME Accordion AjaxFileUpload AlwaysVisibleControl Animation AreaChart AsyncFileUpload AutoComplete BalloonPopup BarChart BubbleChart ...

Atlas causing javascript conflicts? : The Official Forums for Microsoft ASP.NET
I am using an UpdatePanel that contains several LinkButtons and a GridView control. The LinkButtons are used to select/deselect all of the checkboxes ...

Resources last updated: 12/11/2015 2:17:39 PM