vb.net - hyperlink in asp.net that takes the value to the next page -
With asp.net in PSX with IPL. On my first page, I display the names of all employees. I want to give it a hyperlink when it is clicked, open the next page, open a query string and record only that employee. Apart from this, I want to save the employee on the second page (which is not shown on page 1), when I update on the second page, then I use that employee id for "where" section for the update or insert statement Have to do in Any ideas?
If you are not concerned about people messing with query strings, then you can use it And then get data in the next page while using Page_init or Page_load:
HttpContext.Current.Request.Item ("EmployeeID")
However, I'm a fan of not using query string because people tamper with it, you can post your HyperLink PostBackUrl property. You can use (if you use ASP linkbutton), and in the next page you have to access the page from any page to access the page You can use prepay objects.
& lt; Asp: LinkButton id = "lnkEmployeeLink23232" runat = "server" CommandArgument = "23232" PostBackUrl = "NextPage.aspx" text = "employee's name" />
You have to check IsCrossPagePostBack on the first page to ensure that you upgrade without database, but at that time you should take control of postback and receive command order from there. That would be the employee ID in question.
Comments
Post a Comment