The biggest difference in usage is that linkbutton has a click event, but hyperlink does not.
Practice: linkbutton supports sending back. You can perform other operations such as loading and re-configuring URLs in front of the token.
Hyperlink is more like a super connection, so it cannot handle other tasks.
In use, the former URL is specified in postbackurl, and the latter is specified in navigateurl.
If the linkbutton does not specify the click event, you can see that it is a hyper-converged connection by returning to the client's proxy, but there is a JS token in the response, which is why the response is sent.. If there is a postbackurl, the click event cannot be returned. If you want to allow the producer to generate a response, you cannot specify a URL in the proxy.
Hyperlink is completely a failover.
These two controls are both hierarchical, and URL parameters are necessary. It mainly refers to the setting method in the design hierarchy.
1. navigateurl = '<% # "Page. aspx? Id = "+ eval (" ID ") %> 'This method is splicing. Because the URL is a string, it can be connected by adding a few strings, which is convenient, but may not be safe.
2. navigateurl = '<% # string. Format (page. aspx? Id = {0}, Eval ("ID") %> '. This method uses the standard string formatting method, which is more accurate than the standard. It is a good example.
Of course, you can also put the formatting method in the background to restore.
In fact, there are still many ways to calculate data. For example, if you use the gridview, The linkfield in it is very useful. However, the internal part still uses the second method above.
The biggest difference in usage is that linkbutton has a click event, but hyperlink does not.
Practice: linkbutton supports sending back. You can perform other operations such as loading and re-configuring URLs in front of the token.
Hyperlink is more like a super connection, so it cannot handle other tasks.
In use, the former URL is specified in postbackurl, and the latter is specified in navigateurl.
If the linkbutton does not specify the click event, you can see that it is a hyper-converged connection by returning to the client's proxy, but there is a JS token in the response, which is why the response is sent.. If there is a postbackurl, the click event cannot be returned. If you want to allow the producer to generate a response, you cannot specify a URL in the proxy.
Hyperlink is completely a failover.
These two controls are both hierarchical, and URL parameters are necessary. It mainly refers to the setting method in the design hierarchy.
1. navigateurl = '<% # "Page. aspx? Id = "+ eval (" ID ") %> 'This method is splicing. Because the URL is a string, it can be connected by adding a few strings, which is convenient, but may not be safe.
2. navigateurl = '<% # string. Format (page. aspx? Id = {0}, Eval ("ID") %> '. This method uses the standard string formatting method, which is more accurate than the standard. It is a good example.
Of course, you can also put the formatting method in the background to restore.
In fact, there are still many ways to calculate data. For example, if you use the gridview, The linkfield in it is very useful. However, the internal part still uses the second method above.