Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3281352
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:48:23+00:00 2026-05-17T19:48:23+00:00

This is my link button:- <asp:LinkButton ID=lnk1 Text=Set as Default runat=server Visible=false OnClick=lnk1_OnClick></asp:LinkButton> In

  • 0

This is my link button:-

<asp:LinkButton ID="lnk1" Text="Set as Default" runat="server" Visible="false" OnClick="lnk1_OnClick"></asp:LinkButton>

In Code Behind I am simply making it visible

lnk1.Visible = true;

I have checked the IDs over n over..whats wrong ? Intellisense wont detect it either..I am doing something really silly..just cant figure what it is ..help!

I even restarted Visual Studio..still same error

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:48:23+00:00Added an answer on May 17, 2026 at 7:48 pm

    Is the contol part of another control template? E.G. part of a repeaters ItemTemplate etc?

    Update:

    Since OP has said it’s part of a repeaters ItemTemplate, just thought I’d explain what to do (Even though OP has sorted it)

    You need to call FindControl on the Repeater, or Controls.OfType() depending on the situation, to get the control.

    ASP:

        <asp:Repeater runat="server" ID="rptrTest">
            <ItemTemplate>
                <asp:TextBox runat="server" ID="txtBxName" />
                <asp:CheckBox runat="server" ID="chkBx1" />
                <asp:CheckBox runat="server" ID="chkBx2" />
            </ItemTemplate>
        </asp:Repeater>
    

    C#

            IEnumerable<CheckBox> chkBoxes = rptrTest.Controls.OfType<CheckBox>();
            TextBox txtBxName = (TextBox)rptrTest.FindControl("txtBxName");
    

    What I’ll often do for commonly used controls (though wether it’s a good idea or not I’m sure someone will now let me know), is create a member which executes this code.

        private TextBox _txtBxName;
        public TextBox txtBxName {
            get {
                if (_txtBxName == null) {
                    _txtBxName = (TextBox)rptrTest.FindControl("txtBxName");
                }
                return _txtBxName;
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've a link button: <asp:LinkButton ID=LinkButton2 runat=server CausesValidation=False Text=View PostBackUrl='<%# Eval(Name, ../Image/Uploaded/{0}) %>'> The
for example: this code: <asp:LinkButton ID=SignInLinkButton runat=server CssClass=SignInLinkButton TabIndex=3 OnClick=AuthorizeUser>SignIn</asp:LinkButton> shows this as link
I have a link button: <asp:LinkButton ID=LinkButtonPrint runat=server OnClick=OnPrint_Click> <img src=img/print-icon.png alt= /> <asp:Literal
I have HTML code like this: <asp:LinkButton ID=AddButton runat=server OnClick=AddPatientBtn_Click> <span class=Normal>Add</span> </asp:LinkButton> I
net/C# application I have a Link button: <asp:LinkButton runat=server ID=LinkButton1/> When the user clicks
i am getting an error Line 31: <asp:LinkButton ID=company runat=server OnClick=company_Click>Companies Management</asp:LinkButton><br /> that
I have a BulletedList in ASP.NET <asp:BulletedList ID=lstItems OnClick=Item_OnClick DisplayMode=LinkButton runat=server /> On the
I used this, <a title=Logout onclick=javascript:document.getElementById('ctl00_ContentPlaceHolder1_LbLogout').click(); href=# class=logout>Logout</a></li> <asp:LinkButton ID=LbLogout runat=server style=display:none onclick=LbLogout_Click>Sign out</asp:LinkButton>
I would like to generate the Link Button as below in code behind. <asp:LinkButton
This is my repeater: <asp:Repeater ID=myRepeater OnItemCommand=myRepeater_ItemCommand runat=server OnItemDataBound=myRepeater_OnItemDataBound> <HeaderTemplate> <table width=99% border=0 cellpadding=0

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.