Home  >  Q&A  >  body text

javascript - Problems with using hyperlinks in asp.net

1. I am currently working on a project with asp.net and use GridView for data binding. The binding method is the result of the gridview binding database query set in the background:

The problem I encountered is that I want to send the student ID to the target page when clicking the hyperlink. How should I do this?
The picture below is the property window corresponding to the field of admission ticket number:

How can I modify it to pass the current student ID to the RightMain.aspx page?

Also, my current page displays two columns. How can I delete the column on the right? I am a beginner in .net and I don’t quite understand it. Please give me some advice!

phpcn_u1582phpcn_u15822735 days ago670

reply all(1)I'll reply

  • 漂亮男人

    漂亮男人2017-05-19 10:34:36

    CommandArgument="field name"
    Use e.CommandArgument in the Gridview command to get it
    Or write it in the Template<a href='url?要传值的名称=<%# bind("字段名")%>'/>
    Use request.Querstring["name of the value to be passed"] in the .cs of the directed url to get it

    reply
    0
  • Cancelreply