C
Christina
Hiya!!
I am trying to do something really simple here..
I have a link, clicking on which leads to a page say MyPage.aspx.
There's a query string also passed to it. Hence its :
http://machineName/projName/MyPage.aspx?myQueryStr=abcd
Now, I dont want this to be displayed to the user. I want something
like:
http://machineName/projName/MyPage,
on anything, but NOT the querystring.
I tried the below code :
1)
In global.asax.vb :
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As
EventArgs)
Dim strCurrentPath As String
Dim strCustomPath As String
strCurrentPath = Request.Path
strCurrentPath = strCurrentPath.ToLower()
If (strCurrentPath.IndexOf("/MyPage.aspx") > -1) Then
strCustomPath = "http://machineName/projName/MyPage"
Context.RewritePath(strCustomPath)
End If
The above code gives an error : Invalid file name for monitoring..
2)
In page_load of mypage.aspx
Context.RewritePath(strCustomPath)
Still the same error :-(
Any pointers ?
Thanks!!
I am trying to do something really simple here..
I have a link, clicking on which leads to a page say MyPage.aspx.
There's a query string also passed to it. Hence its :
http://machineName/projName/MyPage.aspx?myQueryStr=abcd
Now, I dont want this to be displayed to the user. I want something
like:
http://machineName/projName/MyPage,
on anything, but NOT the querystring.
I tried the below code :
1)
In global.asax.vb :
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As
EventArgs)
Dim strCurrentPath As String
Dim strCustomPath As String
strCurrentPath = Request.Path
strCurrentPath = strCurrentPath.ToLower()
If (strCurrentPath.IndexOf("/MyPage.aspx") > -1) Then
strCustomPath = "http://machineName/projName/MyPage"
Context.RewritePath(strCustomPath)
End If
The above code gives an error : Invalid file name for monitoring..
2)
In page_load of mypage.aspx
Context.RewritePath(strCustomPath)
Still the same error :-(
Any pointers ?
Thanks!!