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. javascript call on asp.net

javascript call on asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-netdatabasehelp
8 Posts 5 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

    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();");
    Page.RegisterStartupScript("abc", "window.close();");

    window.opene.location.reload(); not work in my pge actually i want to refresh my dropdown list box item after add button click my above return code is work and add new entry in database and after that i want that new value show in my dropdown list box. :-D

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

    C G B M 4 Replies Last reply
    0
    • U UD IA

      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();");
      Page.RegisterStartupScript("abc", "window.close();");

      window.opene.location.reload(); not work in my pge actually i want to refresh my dropdown list box item after add button click my above return code is work and add new entry in database and after that i want that new value show in my dropdown list box. :-D

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

      C Offline
      C Offline
      Caio Kinzel Filho
      wrote on last edited by
      #2

      Hi, why don't you use an update panel and do it from server side?

      Intelligence is almost useless for those who have nothing else! Email: caiokf@gmail.com

      U 1 Reply Last reply
      0
      • U UD IA

        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();");
        Page.RegisterStartupScript("abc", "window.close();");

        window.opene.location.reload(); not work in my pge actually i want to refresh my dropdown list box item after add button click my above return code is work and add new entry in database and after that i want that new value show in my dropdown list box. :-D

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

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        Tell the browser to load the page from the server, not just reload it from the cache: window.opener.location.reload(_true_);

        Despite everything, the person most likely to be fooling you next is yourself.

        U 1 Reply Last reply
        0
        • U UD IA

          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();");
          Page.RegisterStartupScript("abc", "window.close();");

          window.opene.location.reload(); not work in my pge actually i want to refresh my dropdown list box item after add button click my above return code is work and add new entry in database and after that i want that new value show in my dropdown list box. :-D

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

          B Offline
          B Offline
          Brij
          wrote on last edited by
          #4

          I think you are using AJAX on this Page.Please register the javascript event with scrip manager as ScriptManager.RegisterStartupScript(this.Page, this.GetType(), this.ClientID, "ShowMessage();",true);

          Cheers!! Brij

          1 Reply Last reply
          0
          • G Guffa

            Tell the browser to load the page from the server, not just reload it from the cache: window.opener.location.reload(_true_);

            Despite everything, the person most likely to be fooling you next is yourself.

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

            To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier. this information is shown in confirm box when i use as u suggest. two buttons are there resend and cancel. what to do now? :-D

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

            G 1 Reply Last reply
            0
            • C Caio Kinzel Filho

              Hi, why don't you use an update panel and do it from server side?

              Intelligence is almost useless for those who have nothing else! Email: caiokf@gmail.com

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

              :-D how i use update panel on this because when i click on link button a new window open through javascript and when form is return from close i want that in my drop down new value should be store? please tell me how to do this? using ajax or any thing else thanks for reply.

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

              1 Reply Last reply
              0
              • U UD IA

                To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier. this information is shown in confirm box when i use as u suggest. two buttons are there resend and cancel. what to do now? :-D

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

                G Offline
                G Offline
                Guffa
                wrote on last edited by
                #7

                Ok, then you need to post a form to the page to recreate it. Does the page have a form that you can use for this?

                Despite everything, the person most likely to be fooling you next is yourself.

                1 Reply Last reply
                0
                • U UD IA

                  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();");
                  Page.RegisterStartupScript("abc", "window.close();");

                  window.opene.location.reload(); not work in my pge actually i want to refresh my dropdown list box item after add button click my above return code is work and add new entry in database and after that i want that new value show in my dropdown list box. :-D

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

                  M Offline
                  M Offline
                  Mohd Azharuddin Ansari
                  wrote on last edited by
                  #8

                  why you are not using __doPostBack insted of window.opener.location.reload(); hope this thing help you

                  Mohd Azharuddin Ansari Syntel Pune

                  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