TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Koteswararao Mallisetti
NA
817
564.1k
how to call the server side code is call for ajax modelpopup contrl events
Aug 20 2010 6:56 AM
hai,
i am showing ajax modal popup window in that i have 2 imgeButtons(save, clear) when in save dialog is disappear but the save_click event cod is not fired what is the problem i am use following code.
In MASTER Page:-
function ok(sender, e)
{
$find('ModalPopupExtenderLogin').hide();
alert("for postBack");
__doPostBack('btnImgSave', e);
}
inClientPage:-
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="users.aspx.cs" Inherits="users" Title="Untitled Page" EnableEventValidation="false" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
</asp:ScriptManagerProxy>
<table id="tblUsers" width ="100%">
<tr><td style="width: 88px"></td><td style="width: 668px" align="right" >
</td><td align="right">
<asp:ImageButton ID="ImgBtnAdd" runat="server" Height="29px" Width="81px"
ImageUrl="~/Imges/addImg.png"
style="margin-left: 0px; margin-bottom: 0px;" ToolTip="Add New User"
AlternateText="Add New User"/>
</td></tr>
<tr><td align="center" colspan="3">
<asp:GridView ID="grdUsers" runat="server" BackColor="White"
BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3"
GridLines="Horizontal" AllowPaging="true" PageSize="10"
AutoGenerateColumns="false" DataKeyNames="UserId" Width="100%"
onrowcommand="grdUsers_RowCommand" onrowediting="grdUsers_RowEditing"
>
<FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
<RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
<PagerStyle HorizontalAlign="Center" BackColor="#E7E7FF" ForeColor="#4A3C8C" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
<HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
<AlternatingRowStyle BackColor="#F7F7F7" />
<Columns>
<asp:BoundField HeaderText="Email Id" DataField="EmailId" NullDisplayText="NoData" ItemStyle-Width="10%"/>
<asp:BoundField HeaderText="First Name" DataField="FirstName" NullDisplayText="NoData" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Last Name" DataField="LastName" NullDisplayText="NoData" ItemStyle-Width="10%"/>
<asp:BoundField HeaderText="Street" DataField="Street" NullDisplayText="NoData" ItemStyle-Width="10%"/>
<asp:BoundField HeaderText="City" DataField="City" NullDisplayText="NoData" ItemStyle-Width="10%"/>
<asp:BoundField HeaderText="Zip Code" DataField="Zip" NullDisplayText="NoData" ItemStyle-Width="10%"/>
<asp:BoundField HeaderText="State" DataField="State" NullDisplayText="NoData" ItemStyle-Width="10%"/>
<asp:BoundField HeaderText="Country" DataField="Country" NullDisplayText="NoData" ItemStyle-Width="10%"/>
<asp:TemplateField ItemStyle-Width ="7%">
<ItemTemplate>
<asp:ImageButton ID="ImgBtnEdit" runat="server" Height="25px" Width="30px" ImageUrl="~/Imges/edit.png" ToolTip="Edit" CommandName="Edit" CommandArgument='<%#Eval("UserId") %>'/><asp:ImageButton ID="ImageButton1" runat="server" Height="25px" Width="30px" ImageUrl="~/Imges/delete.png" ToolTip="Delete" CommandName="Delete" CommandArgument='<%#Eval("UserId") %>' />
</ItemTemplate>
<AlternatingItemTemplate>
<asp:ImageButton ID="ImgBtnEdit" runat="server" Height="25px" Width="30px" ImageUrl="~/Imges/edit.png" ToolTip="Edit" CommandName="Edit" CommandArgument='<%#Eval("UserId") %>'/><asp:ImageButton ID="ImageButton1" runat="server" Height="25px" Width="30px" ImageUrl="~/Imges/delete.png" ToolTip="Delete" CommandName="Delete" CommandArgument='<%#Eval("UserId") %>'/>
</AlternatingItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td></tr>
</table>
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtenderLogin" runat="server"
TargetControlID="ImgBtnAdd"
PopupControlID="LoginPanel"
BackgroundCssClass="modalBackground"
DropShadow="true"
OkControlID="ImgBtnSave"
OnOkScript="ok()"
CancelControlID="imgBtnClose" />
<asp:Panel ID="LoginPanel" runat="server" CssClass="modalPopup " Style="display: none" Width="400px" Font-Names="@MS PGothic">
<table>
<tr>
<td>
</td>
<td class="label ">
First Name :</td>
<td >
<asp:TextBox ID="txtFirstName" runat="server" CssClass="textBox"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td class="label ">
Last Name :
</td>
<td >
<asp:TextBox ID="txtLastName" runat="server" CssClass="textBox"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td class="label ">
Email Id :</td>
<td >
<asp:TextBox ID="txtEmailId" runat="server" CssClass="textBox"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td class="label ">
Street :</td>
<td >
<asp:TextBox ID="txtStreet" runat="server" CssClass="textBox"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td class="label ">
City :</td>
<td >
<asp:TextBox ID="txtCity" runat="server" CssClass="textBox"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td class="label ">
Zip :</td>
<td >
<asp:TextBox ID="txtZip" runat="server" CssClass="textBox" MaxLength="6"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td class="label ">
State :</td>
<td >
<asp:TextBox ID="txtState" runat="server" CssClass="textBox"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td></td><td class="label ">Country :</td><td >
<asp:TextBox ID="txtCountry" runat="server" CssClass="textBox"></asp:TextBox>
</td><td></td>
</tr>
<tr><td></td><td colspan="2" align="center" >
<asp:RadioButton ID="rBtnActive" runat="server" Text="Active" CssClass="chk"
GroupName="g1" />
<asp:RadioButton ID="rBtnInActive" runat="server" Checked="True"
Text="InActive" CssClass="chk" GroupName="g1"/>
</td><td></td></tr>
<%--<tr><td></td><td></td><td></td><asp:Button ID="CancelBtn" runat="server" Text="Cancel" Width="52px" buttonAction="submitButton" /><td></td></tr>
--%> <tr><td></td><td colspan="2" align="center">
<asp:ImageButton ID="imgBtnSave" runat="server" CssClass="images "
ImageUrl="~/Imges/save.png" ToolTip="Save Changes" OnClick="imgBtnSave_Click" />
<%--onclick="imgBtnSave_Click" OnClientClick="confirm('Do You Want Save');" />--%>
<%--<asp:ImageButton ID="imgBtnClear" runat="server" CssClass="images "
ImageUrl="~/Imges/clear.png" ToolTip="Clear All Fields"
OnClientClick="return clearAll()"/>--%>
<asp:ImageButton ID="imgBtnClose" runat="server" CssClass="images "
ImageUrl="~/Imges/close.png" ToolTip="Close" />
</td><td></td></tr>
</table>
</asp:Panel>
</asp:Content>
Reply
Answers (
1
)
about web.config
StringBuilder class