Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. AJAX: How to make relation between a linkbutton in a Accordion Menu and a GridView

AJAX: How to make relation between a linkbutton in a Accordion Menu and a GridView

Scheduled Pinned Locked Moved ASP.NET
databasehelptutorial
8 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    beginner_csharper
    wrote on last edited by
    #1

    I take a mistake like belleow message with runtime ; "A control with ID 'lnk1' could not be found for the trigger in UpdatePanel 'UpdatePanel2'.." lnk1 is my LinkButton's ID thats in the Ajax Accordion Menu content .. and the part of code : ----------- <Triggers> <asp:AsyncPostBackTrigger ControlID="lnk1" EventName="Click" /> </Triggers> </asp:UpdatePanel> ----------- And Please Help me .. Thank u so much for each answers..!

    S 1 Reply Last reply
    0
    • B beginner_csharper

      I take a mistake like belleow message with runtime ; "A control with ID 'lnk1' could not be found for the trigger in UpdatePanel 'UpdatePanel2'.." lnk1 is my LinkButton's ID thats in the Ajax Accordion Menu content .. and the part of code : ----------- <Triggers> <asp:AsyncPostBackTrigger ControlID="lnk1" EventName="Click" /> </Triggers> </asp:UpdatePanel> ----------- And Please Help me .. Thank u so much for each answers..!

      S Offline
      S Offline
      Smart_Boy
      wrote on last edited by
      #2

      Can u post complete ajax update panel code. Also check for the ID for Case sensitive.

      Regards, Smart Boy Mumbai, (INDIA)

      B 1 Reply Last reply
      0
      • S Smart_Boy

        Can u post complete ajax update panel code. Also check for the ID for Case sensitive.

        Regards, Smart Boy Mumbai, (INDIA)

        B Offline
        B Offline
        beginner_csharper
        wrote on last edited by
        #3

        There isn't problem ID's about case sensitive.. and the code below : <asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="server"> <ContentTemplate> <asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" HorizontalAlign="Center" AllowPaging="True" AllowSorting="True"> <FooterStyle BackColor="LightGray" Font-Bold="True" ForeColor="White" BorderStyle="Solid" BorderWidth="2px" Font-Size="Small" /> <RowStyle BackColor="#F7F6F3" ForeColor="#333333" Font-Size="Small" /> <PagerStyle BackColor="LightGray" ForeColor="MediumBlue" HorizontalAlign="Justify" BorderStyle="Solid" BorderWidth="2px" Font-Size="X-Small" /> <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /> <HeaderStyle BackColor="LightGray" Font-Bold="True" ForeColor="MediumBlue" BorderColor="Black" BorderStyle="Solid" BorderWidth="2px" Font-Names="Verdana" Font-Size="X-Small" Font-Strikeout="False" Font-Underline="True" /> <EditRowStyle BackColor="#999999" /> <AlternatingRowStyle BackColor="White" ForeColor="#284775" /> <Columns> <asp:ImageField DataImageUrlField="MARKA_ADI" DataImageUrlFormatString="images/{0}.jpg" HeaderText="GÖRÜNÜM"> </asp:ImageField> </Columns> </asp:GridView> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="lnk2" EventName="Click" /> </Triggers> </asp:UpdatePanel>

        S 1 Reply Last reply
        0
        • B beginner_csharper

          There isn't problem ID's about case sensitive.. and the code below : <asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="server"> <ContentTemplate> <asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" HorizontalAlign="Center" AllowPaging="True" AllowSorting="True"> <FooterStyle BackColor="LightGray" Font-Bold="True" ForeColor="White" BorderStyle="Solid" BorderWidth="2px" Font-Size="Small" /> <RowStyle BackColor="#F7F6F3" ForeColor="#333333" Font-Size="Small" /> <PagerStyle BackColor="LightGray" ForeColor="MediumBlue" HorizontalAlign="Justify" BorderStyle="Solid" BorderWidth="2px" Font-Size="X-Small" /> <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /> <HeaderStyle BackColor="LightGray" Font-Bold="True" ForeColor="MediumBlue" BorderColor="Black" BorderStyle="Solid" BorderWidth="2px" Font-Names="Verdana" Font-Size="X-Small" Font-Strikeout="False" Font-Underline="True" /> <EditRowStyle BackColor="#999999" /> <AlternatingRowStyle BackColor="White" ForeColor="#284775" /> <Columns> <asp:ImageField DataImageUrlField="MARKA_ADI" DataImageUrlFormatString="images/{0}.jpg" HeaderText="GÖRÜNÜM"> </asp:ImageField> </Columns> </asp:GridView> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="lnk2" EventName="Click" /> </Triggers> </asp:UpdatePanel>

          S Offline
          S Offline
          Smart_Boy
          wrote on last edited by
          #4

          In first post u have said that ur button name was "lnk1" and now in ur this reply with the code ur button name is "lnk2"

          Regards, Smart Boy Mumbai, (INDIA)

          B 1 Reply Last reply
          0
          • S Smart_Boy

            In first post u have said that ur button name was "lnk1" and now in ur this reply with the code ur button name is "lnk2"

            Regards, Smart Boy Mumbai, (INDIA)

            B Offline
            B Offline
            beginner_csharper
            wrote on last edited by
            #5

            The name lnk1 or lnk2 is not important, I have already a few LinkButton instance, in the Content of Accordion Menu.. Thats the important point, the update panel can not find whatever linkbutton, that i write in the trigger.. Thanks..

            S 1 Reply Last reply
            0
            • B beginner_csharper

              The name lnk1 or lnk2 is not important, I have already a few LinkButton instance, in the Content of Accordion Menu.. Thats the important point, the update panel can not find whatever linkbutton, that i write in the trigger.. Thanks..

              S Offline
              S Offline
              Smart_Boy
              wrote on last edited by
              #6

              is this link button is in menu?

              Regards, Smart Boy Mumbai, (INDIA)

              B 1 Reply Last reply
              0
              • S Smart_Boy

                is this link button is in menu?

                Regards, Smart Boy Mumbai, (INDIA)

                B Offline
                B Offline
                beginner_csharper
                wrote on last edited by
                #7

                yep ! like this : <Content> <table style="border-color:Black" border="0" cellpadding="0" cellspacing="0" width="129" > <tr> <td class="accordionPaneContent"> <p style="text-align:center"> <asp:LinkButton Font-Underline="false" CssClass="accordionPaneLink" ID="lnk1" onclick="lnk1_Click" Text="1" runat="server">HewlettPackard</asp:LinkButton> </p> </td> </tr>

                S 1 Reply Last reply
                0
                • B beginner_csharper

                  yep ! like this : <Content> <table style="border-color:Black" border="0" cellpadding="0" cellspacing="0" width="129" > <tr> <td class="accordionPaneContent"> <p style="text-align:center"> <asp:LinkButton Font-Underline="false" CssClass="accordionPaneLink" ID="lnk1" onclick="lnk1_Click" Text="1" runat="server">HewlettPackard</asp:LinkButton> </p> </td> </tr>

                  S Offline
                  S Offline
                  Smart_Boy
                  wrote on last edited by
                  #8

                  In event name of ur update panel u have written "Click" as event but in ur linkbutton control onclick event value is "lnk1_Click". If u r writing ur code in ASP.Net then Handler in the event like Protected Sub lnk1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnk1.Click And remove the event name in the Code onclick="lnk1_Click" from ur html and try then. Best of Luck.

                  Regards, Smart Boy Mumbai, (INDIA)

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups