Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET
<asp:ScriptManager ID="ScriptManager1" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<asp:GridView ID="GridView1" runat="server" Width = "550px"
AutoGenerateColumns = "false" AlternatingRowStyle-BackColor = "#C2D69B"
HeaderStyle-BackColor = "green" AllowPaging ="true"
OnPageIndexChanging = "OnPaging"
PageSize = "10" >
<asp:BoundField DataField = "CustomerID" HeaderText = "Customer ID" HtmlEncode = "true" />
<asp:BoundField DataField = "ContactName" HeaderText = "Contact Name" HtmlEncode = "true" />
<asp:BoundField DataField = "CompanyName" HeaderText = "Company Name" HtmlEncode = "true"/>
<asp:TemplateField ItemStyle-Width = "30px" HeaderText = "CustomerID">
       <asp:LinkButton ID="lnkEdit" runat="server" Text = "Edit" OnClick = "Edit"></asp:LinkButton>
<AlternatingRowStyle BackColor="#C2D69B" />
<asp:Button ID="btnAdd" runat="server" Text="Add" OnClick = "Add" />
<asp:Panel ID="pnlAddEdit" runat="server" CssClass="modalPopup" style = "display:none">
<asp:Label Font-Bold = "true" ID = "Label4" runat = "server" Text = "Customer Details" ></asp:Label>
<br />
<table align = "center">
<asp:Label ID = "Label1" runat = "server" Text = "CustomerId" ></asp:Label>
<asp:TextBox ID="txtCustomerID" Width = "40px" MaxLength = "5" runat="server"></asp:TextBox>
<asp:Label ID = "Label2" runat = "server" Text = "Contact Name" ></asp:Label>
<asp:TextBox ID="txtContactName" runat="server"></asp:TextBox>
<asp:Label ID = "Label3" runat = "server" Text = "Company" ></asp:Label>
<asp:TextBox ID="txtCompany" runat="server"></asp:TextBox>
<asp:Button ID="btnSave" runat="server" Text="Save" OnClick = "Save" />
<asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClientClick = "return Hidepopup()"/>
<asp:LinkButton ID="lnkFake" runat="server"></asp:LinkButton>
<cc1:ModalPopupExtender ID="popup" runat="server" DropShadow="false"
PopupControlID="pnlAddEdit" TargetControlID = "lnkFake"
<asp:AsyncPostBackTrigger ControlID = "GridView1" />
<asp:AsyncPostBackTrigger ControlID = "btnSave" />
Posted 19-Dec-12 5:26am
Edited 19-Dec-12 6:28am
Abhishek Pant at 19-Dec-12 12:23pm
I can't see that you have used modalpopup extenteder in above code. If you didn't used that then how will it work. so update your question.
Abhishek Pant at 19-Dec-12 12:30pm
did you registered the ajaxcontroltoolkit for the page-y/n
Member 9571556 at 19-Dec-12 12:32pm
yes sir

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

This is not a question, it's a code dump. Your subject should be something like 'radiobutton and popup grid problem'. Your question should tell us exactly what the bits of code are and what you've tried. I don't see any radio buttons in this code dump. have you debugged in Chrome ? What happens when you click your radio button ?
Overall, I would write my own jquery code to show a popup. I wouldn't use the hugely bloated and inefficient Microsoft 'AJAX' library ( you don't need AJAX to show a popup ). I would never write code like what you posted, it's hoping that a ton of black boxes will do the work for you, and is essentially unreadable.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 400
1 CHill60 200
2 Sergey Alexandrovich Kryukov 170
3 RyanDev 135
4 arvind mepani 120

Advertise | Privacy | Mobile
Web02 | 2.8.140709.1 | Last Updated 19 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid