Friday, April 16, 2010

ASP.NET - Pulling strings/variables from the page URL

These two scripts are very useful if you need to test for variables in a URL, pull values from variables in a URL, or pull any substring from the URL using RegEx.

Getting a variable from the URL with VB.NET


Put this in the HEAD of your page:



Put this in the BODY of your page:

<% =GetURLvariable()%>



Test if a URL contains a string/substring with VB.NET


Put this in the HEAD of your page:



Put this in the BODY of your page:

<% =GetFolder()%>

No comments: