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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. i have a problem with HyperLinkField in GridView

i have a problem with HyperLinkField in GridView

Scheduled Pinned Locked Moved ASP.NET
questioncsharphelp
1 Posts 1 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.
  • M Offline
    M Offline
    memoboy
    wrote on last edited by
    #1

    i have been write a function that provide a data gridView with data and create it with AJAX.Net liprary. but the DataNavigateUrlFields never worked with me and i dont know why!!!!!!!! the code it [Ajax.AjaxMethod] public string Search() { SqlDataSource DS = new SqlDataSource(); DS.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; DS.SelectCommand = "Select ID, Name From Table1"; GridView GV = new GridView(); GV.DataSource = DS; HyperLinkField HLF = new HyperLinkField(); HLF.Text = "Select this"; GV.Columns.Add(HLF); HLF.DataNavigateUrlFormatString = "WebSite2.aspx?FialdNum={0}"; String[] Fialds = new String[] {"ID"}; HLF.DataNavigateUrlFields = Fialds; GV.DataBind(); StringWriter sw = new StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(sw); GV.RenderControl(hw); return sw.ToString(); } and i dont know what is the problem with it thanks!

    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