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. Want To Bind Data To HTML Control [modified]

Want To Bind Data To HTML Control [modified]

Scheduled Pinned Locked Moved ASP.NET
htmlhelp
18 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.
  • R rhtbhegade

    I want to generate HTML Report.... i.e when a button is clicked on .aspx page , i want to open a html page and display the fetched data from the database.... Thanks in adv..

    D Offline
    D Offline
    deepseeindeepsy
    wrote on last edited by
    #4

    Rohit, Which type of html control u have on ur page? Why r u not using SQL Server to fetch the data. :)

    R 1 Reply Last reply
    0
    • R rhtbhegade

      I want to generate HTML Report.... i.e when a button is clicked on .aspx page , i want to open a html page and display the fetched data from the database.... Thanks in adv..

      G Offline
      G Offline
      Gamzun
      wrote on last edited by
      #5

      then why are you using stringbuilder use data source like datatable, fill it with the data and bind it to the controls' source.

      R 1 Reply Last reply
      0
      • D deepseeindeepsy

        Rohit, Which type of html control u have on ur page? Why r u not using SQL Server to fetch the data. :)

        R Offline
        R Offline
        rhtbhegade
        wrote on last edited by
        #6

        Hi Deepak I have to just display data on any control on HTML page m using Sql 2005

        D 1 Reply Last reply
        0
        • G Gamzun

          then why are you using stringbuilder use data source like datatable, fill it with the data and bind it to the controls' source.

          R Offline
          R Offline
          rhtbhegade
          wrote on last edited by
          #7

          i want to bind that data to an html control which is on another html page,and my html control is not on aspx page....then how should i bind ???

          F G 2 Replies Last reply
          0
          • R rhtbhegade

            Hi Deepak I have to just display data on any control on HTML page m using Sql 2005

            D Offline
            D Offline
            deepseeindeepsy
            wrote on last edited by
            #8

            Rohit, First clear me that what page u r using .html or .aspx If U r using .aspx page,then data can be bound to dropdown list from db by using SqlDataSource. Is it so? :)

            R 1 Reply Last reply
            0
            • D deepseeindeepsy

              Rohit, First clear me that what page u r using .html or .aspx If U r using .aspx page,then data can be bound to dropdown list from db by using SqlDataSource. Is it so? :)

              R Offline
              R Offline
              rhtbhegade
              wrote on last edited by
              #9

              m using .aspx page and on the button click of .aspx page i want to display the html page , and on that html page display the data... http://www.codeproject.com/script/Forums/Images/smiley\_cry.gif

              D 1 Reply Last reply
              0
              • R rhtbhegade

                m using .aspx page and on the button click of .aspx page i want to display the html page , and on that html page display the data... http://www.codeproject.com/script/Forums/Images/smiley\_cry.gif

                D Offline
                D Offline
                deepseeindeepsy
                wrote on last edited by
                #10

                Do like as... On btn click use Response.redirect("name of page to redirect to") method. U will go to .html page. In this method u can use Query string of related data to fire query on html page to fill the data to the control on this page. Is there any control on .htm page which support data binding property? :laugh:

                1 Reply Last reply
                0
                • R rhtbhegade

                  i want to bind that data to an html control which is on another html page,and my html control is not on aspx page....then how should i bind ???

                  F Offline
                  F Offline
                  FEMDEV
                  wrote on last edited by
                  #11

                  How are u managing the call to the Page? U need to pass the data/parameter from calling page to your called page and u can handle it on the page as per your need.

                  R 1 Reply Last reply
                  0
                  • F FEMDEV

                    How are u managing the call to the Page? U need to pass the data/parameter from calling page to your called page and u can handle it on the page as per your need.

                    R Offline
                    R Offline
                    rhtbhegade
                    wrote on last edited by
                    #12

                    m calling response.redirect(index.htm) ya i need to pass data/parameter....but could not do so.....

                    F 1 Reply Last reply
                    0
                    • R rhtbhegade

                      i want to bind that data to an html control which is on another html page,and my html control is not on aspx page....then how should i bind ???

                      G Offline
                      G Offline
                      Gamzun
                      wrote on last edited by
                      #13

                      So you've to manually handle/manipulate the string data by JavaScript and feed it to the control.

                      F 1 Reply Last reply
                      0
                      • R rhtbhegade

                        m calling response.redirect(index.htm) ya i need to pass data/parameter....but could not do so.....

                        F Offline
                        F Offline
                        FEMDEV
                        wrote on last edited by
                        #14

                        are you getting any error?

                        R 1 Reply Last reply
                        0
                        • F FEMDEV

                          are you getting any error?

                          R Offline
                          R Offline
                          rhtbhegade
                          wrote on last edited by
                          #15

                          Can u please tell me how to pass the parameter...... m not getting any error

                          M 1 Reply Last reply
                          0
                          • R rhtbhegade

                            Can u please tell me how to pass the parameter...... m not getting any error

                            M Offline
                            M Offline
                            m dhu
                            wrote on last edited by
                            #16

                            use query string or sessions to pass value

                            Response.Redirect
                            ("index.htm?username=" +
                            //parameter value");

                            //in html page
                            TextBox1.Text = Request.QueryString["username"].ToString();

                            R 1 Reply Last reply
                            0
                            • G Gamzun

                              So you've to manually handle/manipulate the string data by JavaScript and feed it to the control.

                              F Offline
                              F Offline
                              FEMDEV
                              wrote on last edited by
                              #17

                              To obtained by plain HTML (no ASP.NET needed): Although this is definitely not the best practise. And am still not very sure if this is what you are looking for. < html > < head > < title>index< /title > < meta http-equiv="REFRESH" content="0;url=http://www.xyz.com/xyz.aspx" > < /head > < body > Index page. < /body > < /html > using a JavaScript code: < html > < head > < title >index< /title > < /head > < body > < script language="javascript" > window.location = "http://www.xyz.com/xyz.aspx"; < /script > Index page. < /body > < /html >

                              1 Reply Last reply
                              0
                              • M m dhu

                                use query string or sessions to pass value

                                Response.Redirect
                                ("index.htm?username=" +
                                //parameter value");

                                //in html page
                                TextBox1.Text = Request.QueryString["username"].ToString();

                                R Offline
                                R Offline
                                rhtbhegade
                                wrote on last edited by
                                #18

                                How could i use TextBox1.Text on HTML page.... TextBox1.Text = Request.QueryString["username"].ToString(); ???????

                                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