The area of linkbutton and Hyperlink and the URL scheme Scheme

Source: Internet
Author: User
Tags failover

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.