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. about loading page

about loading page

Scheduled Pinned Locked Moved ASP.NET
csharpdatabasehelptutorialcareer
2 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.
  • A Offline
    A Offline
    Allah Kaa Bandaa
    wrote on last edited by
    #1

    hi all I want to display different data in a table at runtime.This table contain three columns. Id being the first and name being the second column. Third column is used to display a page whose link is loaded from database. All data in the table is loaded on runtime and table is also generated at runtime using C#. My problem is that, when i use the tag to display the page in the third column, then in the first row data is loaded fine. But in subsequent rows only the data in third column i.e pages ( using <iframe) ) are loaded fine but data in other rows is now displayed( i mean id and name). rows are not displayed.only straight lines of columns are displayed for first and second columns. But for third column all rows are displayed fine... but when i use <img> tag then all thing happend displayed in desired order in the table. since i want to display page not the img so <img> tag is not my requirement. Can somebody tell me how to complete this job using either <iframe> or some other tag. </x-turndown>

    T 1 Reply Last reply
    0
    • A Allah Kaa Bandaa

      hi all I want to display different data in a table at runtime.This table contain three columns. Id being the first and name being the second column. Third column is used to display a page whose link is loaded from database. All data in the table is loaded on runtime and table is also generated at runtime using C#. My problem is that, when i use the tag to display the page in the third column, then in the first row data is loaded fine. But in subsequent rows only the data in third column i.e pages ( using <iframe) ) are loaded fine but data in other rows is now displayed( i mean id and name). rows are not displayed.only straight lines of columns are displayed for first and second columns. But for third column all rows are displayed fine... but when i use <img> tag then all thing happend displayed in desired order in the table. since i want to display page not the img so <img> tag is not my requirement. Can somebody tell me how to complete this job using either <iframe> or some other tag. </x-turndown>

      T Offline
      T Offline
      Thang T
      wrote on last edited by
      #2

      Hi, I did know your problem because I did it. Now I give you a bunch of codes in Visual Basic .NET because i am familiar with VB .NET. But I think it is very easy to translate into C# :) I assume that you have created a table with online one row is the header with 3 columns: ID, Name, URL. The table name is tbMyTable, you can create this table in design mode, or using tag. Then in the Page_load events, your code is Dim cnn as sqlConnection = new sqlConnection(connectionString) 'connectionString is the your connection String Dim cmd as sqlCommand = new Command() Dim reader as new sqlDataReader() cnn.open() cmd.Connection = cnn cmd.CommandText = "SELECT * FROM tbContent" reader = cmd.ExecuteReader() Do While reader.read Dim dr as new TableRow() Dim dcID as New TableCell() Dim dcName as New TableCell() Dim dcURL as New TableCell() dcID.Text = reader.getInt32(0) dcName.Text = reader.getString(1) dcURL.text = "<a href = ''>" & reader.getString(2) & "</a>" dr.Cells.Add (dcID) dr.Cells.Add (dcName) dr.Cells.Add (dcURL) tbMyTable.Rows.Add (dr) Loop reader.close cnn.close() Ich liebe .NET :)

      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