سلام
من یک گرید ویو تو صفحه دارم که داخش یک لینک باتن هست که وقتی روش کلیک میکنم یک مدال رو نشون میده و داخل این مدال یک گرید وید هست که عکس های منو از دیتابیس میخونه و نشان میده تا اینجا همه چیز اوکی هست ولی زمانی که مثل روی دکمه حذف کلیک میکنم عملیات رو انجام میده و مدال رو میبنده یا مثلا زمانی که چند صفحه شده باشه گرید ویو و روی صفحه دیگه ای کلیک کنم صفحه تغییر میکنه و بسته میشه مدال
حال من چه طوری میتونم جلوی بسته شدن این مدال رو بگیرم تا زمانی که کلیک می کنم بسته نشه
از آپدیت پنل ایجکس ، مدال اکستندر ایجکس و پنل استفاده کرده
برای این بسته میشه چون PostBack انجام میشه و صفحه دوباره بارگذاری میشه
میتونید گرید را داخل UpdatePanle قرار دهید
در پست قبلی خدمتتون عرض کردم از
از آپدیت پنل ایجکس ، مدال اکستندر ایجکس و پنل استفاده کرده
و مشکل حل نشده
بعید میدونم ابنجا جوابی برای مشکلات پبدا بشه !!!
نمونه کدتون رو ضمیمه کنید تا بررسی کنم !
<%@ Page Title="" Language="VB" MasterPageFile="~/local.master" AutoEventWireup="false" CodeFile="Aboutus.aspx.vb" Inherits="Aboutus" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server" > <link href="Admin/css/thin-admin.css" rel="stylesheet" media="screen" /> <link href="Admin/style/style.css" rel="stylesheet" /> <script type="text/javascript"> // a reference to the popup behavior var _popup; function validate(){ // find the popup behavior this._popup = $find('mdlPopup'); // show the popup this._popup.show(); // kick-off the webservice, registering our callback PageMethods.ValidateCreditCard($get('ImageButton2').value, this.callback); } function callback(){ this._popup.hide(); } </script> <style> #icons { position: absolute; top: 20px; right: 230px; } #icons li { float: left; padding: 0 0 0 9px; line-height: 32px; word-spacing: 2px; letter-spacing: -1px; font-size: 1.667em; color: #1e1915; } .modalBackground { background-color: black; filter: alpha(opacity=50); opacity: 0.70; } .updateProgress { border-width: 1px; border-style: solid; background-color: #FFFFFF; position: absolute; width: 180px; height: 65px; } </style> <style> .details { width: 100%; height: 90%; } .details ul { list-style-image: none; list-style-type: none; margin: 0; padding: 10px; } /*.details ul label { font-weight: bold; }*/ div.RadForm.rfdRadio.rfdLabel label { vertical-align: baseline; } .photo-container { padding: 10px; width: 120px; float: left; } .RadListView { display: flex; flex-wrap: wrap; padding-right: 5px; font: 1em "segoe ui",arial,sans-serif; } .demo-container fieldset { margin: 10px auto 5px 5px; min-width: 350px; /*height: 150px;*/ flex: 1 1 0; } .t-ie7 .demo-container fieldset, .t-ie8 .demo-container fieldset, .t-ie9 .demo-container fieldset, .t-ie10 .demo-container fieldset { width: 390px; display: inline-block; vertical-align: top; } .t-ie7 .RadListView { padding: 0 0 5px 5px; } .t-ie7 .demo-container fieldset { margin-left: 0; } .auto-style2 { width: 100%; } </style> <style type="text/css"> .auto-style100 { text-align: left; } </style> <table align="center" border="0" cellpadding="1" cellspacing="1" style="width:auto;height:auto; word-break:break-all;"> <tbody><tr> <td style="word-break:break-all;"> <asp:Literal ID="Literal2" runat="server" Text="wwwwww"></asp:Literal> </td> </tr> </tbody> </table> <asp:ScriptManager ID="ScriptManager1" runat="server"/> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:DataList ID="DataList4" runat="server" RepeatColumns="2" RepeatDirection="Horizontal" Width="697px" OnItemCommand="DataList4_ItemCommand" OnLoad="DataList4_Load" > <ItemTemplate> <fieldset> <div class="details"> <div class="photo-container"> <asp:ImageButton ID="ImageButton2" runat="server" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.Staff_ID") %>' CommandName="cmedit" Height="110px" ImageUrl='<%# DataBinder.Eval(Container, "DataItem.Staff_Pic") %>' Width="90px" /> </div> <div class="data-container"> <ul> <li> <asp:Label ID="Label8" runat="server" Text="<%$ Resources:Resource, Contact_Name %>">"</asp:Label> <a style="font-weight: bold; font-size: 15px"><%#Eval("Staff_Fist_Name")%><%#Eval("Staff_Last_Name")%></a></li> <li> <asp:Label ID="Label9" runat="server" Text="<%$ Resources:Resource, Position %>">"</asp:Label> <%#Eval("Staff_Position")%></li> <li> <div style="word-break:break-all;"> <asp:Label ID="Label10" runat="server" Text="<%$ Resources:Resource, Detail %>">"</asp:Label> <%#Eval("Staff_Detail").ToString().PadRight(140).Substring(0, 140).TrimEnd()%> </div> </li> </ul> </div> </div> </fieldset> </ItemTemplate> </asp:DataList> <asp:Label ID="Label7" runat="server" Text="rrrrrrrrrreeeeeeeza"></asp:Label> <cc1:modalpopupextender ID="mdlPopup" TargetControlID="Label7" PopupControlID="pnlPopup" BackgroundCssClass="modalBackground" runat="server" Drag="True" DropShadow="True"></cc1:modalpopupextender> <asp:Panel ID="pnlPopup" runat="server" style="display:none"> <asp:Button runat="server" ID="hidentest" Visible="false" /> <table cellpadding="0" cellspacing="0" class="auto-style2" style="width: 400px; height: 500px; background-color:white;"> <tr> <td class="auto-style100" style="height: 114px" valign="top"><asp:ImageButton ID="ImageButton1" runat="server" Height="110px" Width="90px" /></td> </tr> <tr> <td class="auto-style100" style="height: 35px" valign="top"> <asp:Label ID="Label4" runat="server" Text="<%$ Resources:Resource, Contact_Name %>">"</asp:Label> <asp:Label ID="sname" runat="server" Text=""></asp:Label></td> </tr> <tr> <td class="auto-style100" style="height: 35px" valign="top"> <asp:Label ID="Label5" runat="server" Text="<%$ Resources:Resource, Position %>">"</asp:Label> <asp:Label ID="spos" runat="server" Text=""></asp:Label></td> </tr> <tr> <td class="auto-style100" valign="top" style="word-break:break-all; height: 284px;"> <asp:Label ID="Label6" runat="server" Text="<%$ Resources:Resource, Detail %>">"</asp:Label> <asp:Label ID="sdet" runat="server" Text="Label"></asp:Label></td> </tr> <tr> <td> <asp:Button ID="Button1" CssClass="btn-facebook" runat="server" Text="Close" /> </tr> </table> </asp:Panel> </ContentTemplate> </asp:UpdatePanel> </asp:Content>
Private Sub Aboutus_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then staffload() End If End Sub ------------------------- Private Sub staffload() Dim sqlText2 As String sqlText2 = ("SELECT * FROM [T_Staffs] where Immo_ID='" + Session("get_immo_id").ToString() + "'") Dim dt2 As DataTable = New DataTable Dim sda2 As SqlDataAdapter = New SqlDataAdapter(sqlText2, cn) sda2.Fill(dt2) DataList4.DataSource = dt2 DataList4.DataKeyField = "Staff_ID" DataList4.DataBind() End Sub ------------------------------------------- Private Sub DataList4_ItemCommand(source As Object, e As DataListCommandEventArgs) Handles DataList4.ItemCommand If e.CommandName.Equals("cmgallary") Then msgbox("ok") End If End Sub
اول که تشکر
دوم که درست نیست انتقاد رو پاک کنین
سوم هم کد رو گذاشتم همین کد تو صفحه ای که مستر پیج نباشه به راحتی جواب میده
هیچ کاربری تا کنون از این پست تشکر نکرده است
با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)