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. HyperlinkColumn!

HyperlinkColumn!

Scheduled Pinned Locked Moved Web Development
helphtmlmcpsecuritytutorial
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.
  • N Offline
    N Offline
    nclauder
    wrote on last edited by
    #1

    Hi all, I have this big problem with hyperlinks I would appriciate any help please. My web site has two datagrids on the same page. And one has a list of names of the users which are in a HyperlinkColumn. The second datagrid is for inserting data, and when a user inserts data I used 'Windows Authentication' for names in one column called Name. Now this is how it's supposed to work: When any user want to see data about a particular user it's a matter of selecting his name and the data Writen by the selected user should be the only ones to be shown. I got some examples on Google but they all seem not to be working. When a user is selected the URL changes instead of the particular rows in the datagrid to be selected. For example the original url is "http://localhost/Dash\_Board/DashBoard.aspx" and if I select user Claude the URL change into "http://localhost/Dash\_Board/Claude" and get an error The page cannot be found. Why would this be happening? My code looks like this: HTML part: and code behind: private void dgbilling_SelectedIndexChanged(object sender, System.EventArgs e) { SqlCommand myCommand = new SqlCommand("select * from dbo.DashBoard where Name = @Billing",con); SqlParameter myparam = new SqlParameter("@Billing",SqlDbType.Text); myparam.Value="../Dash_Board/DashBoard.aspx?,Name{0}"; myCommand.Parameters.Add(myparam); SqlDataAdapter myAdapter=new SqlDataAdapter(myCommand); DataSet ds = new DataSet(); myAdapter.Fill(ds); dgis.DataSource=ds; dgis.EditItemIndex = -1; dgis.DataBind(); } dgis: this is the datagrid that where user inserts data. dgbilling: this is the hyperlinkcolumn. Thanks.

    P 1 Reply Last reply
    0
    • N nclauder

      Hi all, I have this big problem with hyperlinks I would appriciate any help please. My web site has two datagrids on the same page. And one has a list of names of the users which are in a HyperlinkColumn. The second datagrid is for inserting data, and when a user inserts data I used 'Windows Authentication' for names in one column called Name. Now this is how it's supposed to work: When any user want to see data about a particular user it's a matter of selecting his name and the data Writen by the selected user should be the only ones to be shown. I got some examples on Google but they all seem not to be working. When a user is selected the URL changes instead of the particular rows in the datagrid to be selected. For example the original url is "http://localhost/Dash\_Board/DashBoard.aspx" and if I select user Claude the URL change into "http://localhost/Dash\_Board/Claude" and get an error The page cannot be found. Why would this be happening? My code looks like this: HTML part: and code behind: private void dgbilling_SelectedIndexChanged(object sender, System.EventArgs e) { SqlCommand myCommand = new SqlCommand("select * from dbo.DashBoard where Name = @Billing",con); SqlParameter myparam = new SqlParameter("@Billing",SqlDbType.Text); myparam.Value="../Dash_Board/DashBoard.aspx?,Name{0}"; myCommand.Parameters.Add(myparam); SqlDataAdapter myAdapter=new SqlDataAdapter(myCommand); DataSet ds = new DataSet(); myAdapter.Fill(ds); dgis.DataSource=ds; dgis.EditItemIndex = -1; dgis.DataBind(); } dgis: this is the datagrid that where user inserts data. dgbilling: this is the hyperlinkcolumn. Thanks.

      P Offline
      P Offline
      Panchal Hardik
      wrote on last edited by
      #2

      Replace hyper link with this and write the code on datagrid item command & find the name from command Argument asp:LinkButton ID="lbtnName" Runat="server" Text="NAme" CommandArgument="Selected Name"/asp:LinkButto>" -- modified at 9:02 Friday 11th May, 2007

      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