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 toolkit modalpopupextender problem

ajax toolkit modalpopupextender problem

Scheduled Pinned Locked Moved ASP.NET
databasehelpquestion
10 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.
  • U Offline
    U Offline
    UD IA
    wrote on last edited by
    #1
    PopupControlID="pnl11" BackgroundCssClass="modalBackground" OkControlID="btn\_add" 
    OnOkScript="onOk()" Drag="true" DropShadow="true"  />
    

    hellow as i mention above a modalpopup extender i open a new panel and panel is opned and i have a button add to add new data in database but its not working and when i use debugging to check what happen then cursor is not reached that position. is it possible or not? thanks :-D

    I will do my best? Integrated Solutions, Bikaner (Raj.), India

    A 1 Reply Last reply
    0
    • U UD IA
      PopupControlID="pnl11" BackgroundCssClass="modalBackground" OkControlID="btn\_add" 
      OnOkScript="onOk()" Drag="true" DropShadow="true"  />
      

      hellow as i mention above a modalpopup extender i open a new panel and panel is opned and i have a button add to add new data in database but its not working and when i use debugging to check what happen then cursor is not reached that position. is it possible or not? thanks :-D

      I will do my best? Integrated Solutions, Bikaner (Raj.), India

      A Offline
      A Offline
      Andreas X
      wrote on last edited by
      #2

      Hi! Have you tried to remove OnOkScript="onOk()". I have had problems mixing OkScript on client side with the code behind button onclick handler. Also, i assume that you have a button control names btn_add which is AutoPostBack="true" and you have a OnClicked event connected to is? otherwise, I need more information about your problem te be able to help.

      U 1 Reply Last reply
      0
      • A Andreas X

        Hi! Have you tried to remove OnOkScript="onOk()". I have had problems mixing OkScript on client side with the code behind button onclick handler. Also, i assume that you have a button control names btn_add which is AutoPostBack="true" and you have a OnClicked event connected to is? otherwise, I need more information about your problem te be able to help.

        U Offline
        U Offline
        UD IA
        wrote on last edited by
        #3

        Thanks for reply and i am using this code:

        PopupControlID="pnl11" BackgroundCssClass="modalBackground" OkControlID="btn\_add" 
         Drag="true" DropShadow="true"  />
        

        and on btn_Add_new_project click event i store values in database. but value is not stored in database as u suggest that i remove OnOkScript="onOk()" i remove but problem still there. :-D

        I will do my best? Integrated Solutions, Bikaner (Raj.), India

        A 1 Reply Last reply
        0
        • U UD IA

          Thanks for reply and i am using this code:

          PopupControlID="pnl11" BackgroundCssClass="modalBackground" OkControlID="btn\_add" 
           Drag="true" DropShadow="true"  />
          

          and on btn_Add_new_project click event i store values in database. but value is not stored in database as u suggest that i remove OnOkScript="onOk()" i remove but problem still there. :-D

          I will do my best? Integrated Solutions, Bikaner (Raj.), India

          A Offline
          A Offline
          Andreas X
          wrote on last edited by
          #4

          can you provide the btn_add control aspx code?

          Andreas Johansson
          IT Professional at Office IT Partner i Norrbotten Sweden
          What we don't know. We learn.
          What you don't know. We teach

          U 1 Reply Last reply
          0
          • A Andreas X

            can you provide the btn_add control aspx code?

            Andreas Johansson
            IT Professional at Office IT Partner i Norrbotten Sweden
            What we don't know. We learn.
            What you don't know. We teach

            U Offline
            U Offline
            UD IA
            wrote on last edited by
            #5

            thanks for reply.

            when i click on this link button my popup window will be open. and when i click on btn_add code is

            protected void btn_add_Click(object sender, EventArgs e)
            {
            DataTable tbl_test = dt.filltbl("select * from tbl_issue_type where issue_type=" + "'" + txt_issue_type.Text + "'", "aa");
            if (tbl_test.Rows.Count > 0)
            {
            Page.RegisterStartupScript("myrest", "alert('issue type already exists');");
            }
            else
            {
            DataTable tbl1 = dt.filltbl("select * from tbl_issue_type where id=-1", "new1");
            DataRow row1 = tbl1.NewRow();
            row1["issue_type"] = txt_issue_type.Text;
            tbl1.Rows.Add(row1);
            dt.update(tbl1, "select * from tbl_issue_type");
            Page.RegisterStartupScript("myrest", "alert('New issue was added successfully');");
            //Page.RegisterStartupScript("myqd", "window.opener.location.reload(true);");
            //Page.RegisterStartupScript("abc", "window.close();");
            }
            }

            :-D

            I will do my best? Integrated Solutions, Bikaner (Raj.), India

            A 1 Reply Last reply
            0
            • U UD IA

              thanks for reply.

              when i click on this link button my popup window will be open. and when i click on btn_add code is

              protected void btn_add_Click(object sender, EventArgs e)
              {
              DataTable tbl_test = dt.filltbl("select * from tbl_issue_type where issue_type=" + "'" + txt_issue_type.Text + "'", "aa");
              if (tbl_test.Rows.Count > 0)
              {
              Page.RegisterStartupScript("myrest", "alert('issue type already exists');");
              }
              else
              {
              DataTable tbl1 = dt.filltbl("select * from tbl_issue_type where id=-1", "new1");
              DataRow row1 = tbl1.NewRow();
              row1["issue_type"] = txt_issue_type.Text;
              tbl1.Rows.Add(row1);
              dt.update(tbl1, "select * from tbl_issue_type");
              Page.RegisterStartupScript("myrest", "alert('New issue was added successfully');");
              //Page.RegisterStartupScript("myqd", "window.opener.location.reload(true);");
              //Page.RegisterStartupScript("abc", "window.close();");
              }
              }

              :-D

              I will do my best? Integrated Solutions, Bikaner (Raj.), India

              A Offline
              A Offline
              Andreas X
              wrote on last edited by
              #6

              Do you have a control that looks like this?

              Andreas Johansson
              IT Professional at Office IT Partner i Norrbotten Sweden
              What we don't know. We learn.
              What you don't know. We teach

              U 1 Reply Last reply
              0
              • A Andreas X

                Do you have a control that looks like this?

                Andreas Johansson
                IT Professional at Office IT Partner i Norrbotten Sweden
                What we don't know. We learn.
                What you don't know. We teach

                U Offline
                U Offline
                UD IA
                wrote on last edited by
                #7

                No i don't have any button as you mention. :rose:

                I will do my best? Integrated Solutions, Bikaner (Raj.), India

                A 1 Reply Last reply
                0
                • U UD IA

                  No i don't have any button as you mention. :rose:

                  I will do my best? Integrated Solutions, Bikaner (Raj.), India

                  A Offline
                  A Offline
                  Andreas X
                  wrote on last edited by
                  #8

                  Ok! your have a modal poupextender:

                  PopupControlID="pnl11" BackgroundCssClass="modalBackground" OkControlID="btn\_add" 
                  OnOkScript="onOk()" Drag="true" DropShadow="true"  />
                  

                  which is shown when you click on targetcontrolid="btn_Add_new_project" then you have:

                  which is the button to open the modal with. this button is connected to a onclick="btn_Add_new_project_Click" which I know nothing about. then you have the method:

                  protected void btn_add_Click(object sender, EventArgs e)
                  {
                  DataTable tbl_test = dt.filltbl("select * from tbl_issue_type where issue_type=" + "'" + txt_issue_type.Text + "'", "aa");
                  if (tbl_test.Rows.Count > 0)
                  {
                  Page.RegisterStartupScript("myrest", "alert('issue type already exists');");
                  }
                  else
                  {
                  DataTable tbl1 = dt.filltbl("select * from tbl_issue_type where id=-1", "new1");
                  DataRow row1 = tbl1.NewRow();
                  row1["issue_type"] = txt_issue_type.Text;
                  tbl1.Rows.Add(row1);
                  dt.update(tbl1, "select * from tbl_issue_type");
                  Page.RegisterStartupScript("myrest", "alert('New issue was added successfully');");
                  //Page.RegisterStartupScript("myqd", "window.opener.location.reload(true);");
                  //Page.RegisterStartupScript("abc", "window.close();");
                  }
                  }

                  which is supposed to be called by a button the has a onclick="btn_Add_Click" event connected. I have not seen this one either. so my question: do you want to store tha data to the database when you open your modal or when you close it? do you have a button to close it? since the button i asked for does not exist:

                  and according to the modal popup extender, this button, or something with the same name should close the modal.

                  Andreas Johansson
                  IT Professional at Office IT Partner i Norrbotten Sweden
                  What we don't know. We

                  U 1 Reply Last reply
                  0
                  • A Andreas X

                    Ok! your have a modal poupextender:

                    PopupControlID="pnl11" BackgroundCssClass="modalBackground" OkControlID="btn\_add" 
                    OnOkScript="onOk()" Drag="true" DropShadow="true"  />
                    

                    which is shown when you click on targetcontrolid="btn_Add_new_project" then you have:

                    which is the button to open the modal with. this button is connected to a onclick="btn_Add_new_project_Click" which I know nothing about. then you have the method:

                    protected void btn_add_Click(object sender, EventArgs e)
                    {
                    DataTable tbl_test = dt.filltbl("select * from tbl_issue_type where issue_type=" + "'" + txt_issue_type.Text + "'", "aa");
                    if (tbl_test.Rows.Count > 0)
                    {
                    Page.RegisterStartupScript("myrest", "alert('issue type already exists');");
                    }
                    else
                    {
                    DataTable tbl1 = dt.filltbl("select * from tbl_issue_type where id=-1", "new1");
                    DataRow row1 = tbl1.NewRow();
                    row1["issue_type"] = txt_issue_type.Text;
                    tbl1.Rows.Add(row1);
                    dt.update(tbl1, "select * from tbl_issue_type");
                    Page.RegisterStartupScript("myrest", "alert('New issue was added successfully');");
                    //Page.RegisterStartupScript("myqd", "window.opener.location.reload(true);");
                    //Page.RegisterStartupScript("abc", "window.close();");
                    }
                    }

                    which is supposed to be called by a button the has a onclick="btn_Add_Click" event connected. I have not seen this one either. so my question: do you want to store tha data to the database when you open your modal or when you close it? do you have a button to close it? since the button i asked for does not exist:

                    and according to the modal popup extender, this button, or something with the same name should close the modal.

                    Andreas Johansson
                    IT Professional at Office IT Partner i Norrbotten Sweden
                    What we don't know. We

                    U Offline
                    U Offline
                    UD IA
                    wrote on last edited by
                    #9

                    there is a dropdown listbox having bound with database if user want new data then click a linkbutton on myform and when i click on this button a panel is open through modal popup. panel which is open through modal popup having a textbox and a button. when i click on this button i want that textbox value enter into the database and return to the form which out modal popup. means this will add a new data in database and new datafill in dropdown list box. if still you confused i will send you whole page and code i used. thanks to reply me. :-D

                    I will do my best? Integrated Solutions, Bikaner (Raj.), India

                    A 1 Reply Last reply
                    0
                    • U UD IA

                      there is a dropdown listbox having bound with database if user want new data then click a linkbutton on myform and when i click on this button a panel is open through modal popup. panel which is open through modal popup having a textbox and a button. when i click on this button i want that textbox value enter into the database and return to the form which out modal popup. means this will add a new data in database and new datafill in dropdown list box. if still you confused i will send you whole page and code i used. thanks to reply me. :-D

                      I will do my best? Integrated Solutions, Bikaner (Raj.), India

                      A Offline
                      A Offline
                      Andreas X
                      wrote on last edited by
                      #10

                      Ok. Send me an email containing the page and i will take a look at it.

                      Andreas Johansson
                      IT Professional at Office IT Partner i Norrbotten Sweden
                      What we don't know. We learn.
                      What you don't know. We teach

                      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