Click here to Skip to main content
15,876,993 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
i need to make popup window to edit rows in my gridview tjere are many examples all of thems works fine the window it desnt popup this is my code this page is inheted from master page
 <%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true" CodeFile="Articaledit.aspx.cs" Inherits="Admin_Articaledite" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
  <script type="text/javascript">
  $(document).ready(function () {
  $('a#popup').live('click', function (e) {
  var page = $(this).attr("href")
  var $dialog = $('<div></div>')
  .html('<iframe style="border: 0px; " src="' + page + '" width="100%" height="100%"></iframe>')
  autoOpen: false,
  modal: true,
  height: 450,
  width: 'auto',
   title: "Edit Artical",
  buttons: {
  "Close": function () { $dialog.dialog('close'); }
  close: function (event, ui) {
  __doPostBack('<%= btnRefresh.ClientID %>', '');
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <div id="DivContent">
  <aside class="right-side">
  <!-- Content Header (Page header) -->

  <section class="content-header">
  Main Slider
  <small>Artical edit</small>
  <form id="form1" runat="server">
  <h1>Edit Artical</h1>
  <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
  <asp:UpdateProgress ID="UpdateProgress1" runat="server">
  <img src="Loading.gif" alt="" />

  <asp:DropDownList ID="ddlatrical" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlatrical_SelectedIndexChanged" >
  <asp:ListItem Value="1">Arabic</asp:ListItem>
  <asp:ListItem Value="2">English</asp:ListItem>
  <br />
  <br />

  <asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional" >

<asp:GridView ID="GridView1" runat="server" Width = "900px"
AutoGenerateColumns = "False" Font-Names = "Arial"
Font-Size = "11pt" AlternatingRowStyle-BackColor = "#367fa9"
HeaderStyle-BackColor = "#99ccff" AllowPaging ="True"
OnPageIndexChanging = "OnPaging"
 CellPadding="6" ForeColor="#333333" GridLines="None" >
  <%-- row pdf_name --%>
<asp:TemplateField ItemStyle-Width = "200px" HeaderText = "Artical title">
  <asp:Label ID="lblBookName" runat="server" class="text-center"
  Text='<%# Eval("Ar_Wtitle")%>'></asp:Label>
  <asp:TextBox ID="txtBookName" runat="server"
  Text='<%# Eval("Ar_Wtitle")%>'></asp:TextBox>

  <ItemStyle Width="200px" />
  <%-- row pdf_name --%>
  <%-- row pdf_date --%>
  <asp:TemplateField ItemStyle-Width = "200px" HeaderText = "Read More">
  <asp:Label ID="lblbookdate" runat="server"
  Text='<%# Eval("WReadMore")%>'></asp:Label>
  <asp:TextBox ID="txtbookdate" runat="server"
  Text='<%# Eval("WReadMore")%>'></asp:TextBox>

  <ItemStyle Width="200px" />
  <asp:TemplateField HeaderText="ID">
  <ItemTemplate >
  <a id="popup" href='EditArtical.aspx?id=<%# Eval("id") %>' >edit</a>
  <%-- row pdf_date --%>
  <asp:LinkButton ID="lnkRemove" runat="server"
  CommandArgument = '<%# Eval("id")%>'
  OnClientClick = "return confirm('Do you want to delete?')"
  Text = "Delete" OnClick = "Deletepdfbook"></asp:LinkButton>

<AlternatingRowStyle BackColor="White" />
  <EditRowStyle BackColor="#2461BF" />
  <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
  <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
  <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
  <RowStyle BackColor="#EFF3FB" />
  <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
  <SortedAscendingCellStyle BackColor="#F5F7FB" />
  <SortedAscendingHeaderStyle BackColor="#6D95E1" />
  <SortedDescendingCellStyle BackColor="#E9EBEF" />
  <SortedDescendingHeaderStyle BackColor="#4870BE" />
  <asp:Button ID="btnRefresh" Text="refresh" runat="server" style="display:none"
  onclick="btnRefresh_Click" />
  <asp:AsyncPostBackTrigger ControlID="btnRefresh" EventName="Click" />

  <!-- Main content -->
  <!-- /.content -->

and this is my master page head
 <%@ Master Language="C#" AutoEventWireup="true" CodeFile="AdminMasterPage.master.cs" Inherits="Admin_AdminMasterPage" %>

<!DOCTYPE html>
    <head runat="server">
        <meta charset="UTF-8">
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- bootstrap 3.0.2 -->
        <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <!-- font Awesome -->
        <link href="css/font-awesome.min.css" rel="stylesheet" type="text/css" />
        <!-- Ionicons -->
        <link href="css/ionicons.min.css" rel="stylesheet" type="text/css" />
        <!-- Morris chart -->
        <link href="css/morris/morris.css" rel="stylesheet" type="text/css" />
        <!-- jvectormap -->
        <link href="css/jvectormap/jquery-jvectormap-1.2.2.css" rel="stylesheet" type="text/css" />
        <!-- fullCalendar -->
        <link href="css/fullcalendar/fullcalendar.css" rel="stylesheet" type="text/css" />
        <!-- Daterange picker -->
        <link href="css/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
        <!-- bootstrap wysihtml5 - text editor -->
        <link href="css/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css" rel="stylesheet" type="text/css" />
        <!-- Theme style -->
        <link href="css/AdminLTE.css" rel="stylesheet" type="text/css" />

        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src=""></script>
          <script src=""></script>

        <script type="text/javascript" src="ckeditor/ckeditor.js"></script>

         <script src=""></script>
         <script src="Scripts/jquery.MultiFile.js" type="text/javascript"></script>

<script type="text/javascript" src=""></script>
    <script type="text/javascript" src=""></script>
    <link type="text/css" rel="Stylesheet" href="">

        <asp:ContentPlaceHolder id="head" runat="server">


 what  is the best soulation  for that problem ??
Sergey Alexandrovich Kryukov 13-Aug-14 17:22pm    
This is just a code dump. Who would like to dig into it, if you don't bother to explain what's not working?
SteveyJDay 15-Aug-14 16:07pm    

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900