|
Dear all,
i have to send a url with some parameters to a another website through my web app. How can i avoid the '&
' and ';' in my url(because the other app gives a error with &
and is out of my control).
i tryid : Server.DecodeUrl en Server.EncodeUrl, bud it does not work.
Im using
Response.Redirect(url)
to pass the url. In my side looks the url something like this:
https://pay.bank.nl/internetbank/SesamLoginServlet?sessie=id&trid=002&rand=2180fe5a3ff1c3b5
So no &
. Bud on the other side you will see &
instead of &
How can i avoid this?
Thanks
modified on Thursday, September 3, 2009 4:24 AM
|
|
|
|
|
Hi,
don't know if I get you right. How does the url look like when you put it into Response.Redirect? Does it have & within?
Regards
Sebastian
|
|
|
|
|
Hi Sebastian,
In my side it has only &. bud ofter redirect, on the other side it has & and that's not good, they accept only &
|
|
|
|
|
That is because the & are encoded. Did you use any UrlEncode before?
|
|
|
|
|
Yes i did and also checked, it had no & . bud ofter passing it to the other page, you will see &
|
|
|
|
|
Okay, then could you post your code? First I would try to out just the string in the Response.Redirect (hardcoded). If this works then the problem is when you create the string. If not, the problem is REsponse.Redirect.
But let us take a look at your code.
|
|
|
|
|
Hi Semartens,
Thanks for replay.
Here is my code:
string url = issuerAuthenticationURL.Text;
string url2 = Server.UrlDecode(url);
Response.Redirect(url2);
When copy and paste the url2, it works fine, bud if i do Response.Redirect(url2) then it goes wrong.
|
|
|
|
|
1. Why do you Decode the Url? Don't you have to encode?
2. What if you just pass url, not url2?
3. Does your Url contains & or just & ?
|
|
|
|
|
Thanks SerMartens and others, the issue is solved by using the
Server.HtmlDecode instead of urldecode
|
|
|
|
|
Sure... glad that you found the solution...
|
|
|
|
|
can any one tell me why should a developer store session in sql server asp.net 2.0.
i never store session in sql server rather i always use in-proc session. what would be the advantage if i store session in sql server. tell me in more detail in what kind of situation a developer will think to store the session in sql server. please explain me in detail
Thanks in advance.
tbhattacharjee
|
|
|
|
|
|
|
I hav launched my site on server in " wwwroot" folder.......is it possible to launch other pages on the same server with a new folder...........if yes then hw much web.config shud be used........either one or two..........for e.g. in wwwroot folder i created one more folder "Billing" and put some new pages in it....for these do i need new web.confog or not........plz guide me a bit??
|
|
|
|
|
Hi,You can use as many Web.config for individual folders to which u want to set different access permissions.
But the root level web.config should be unique to govern ur web site.
|
|
|
|
|
i really neeed help .
i want to show the details when a specific column value is clicked.
pls help how can i achieve this.
|
|
|
|
|
Hi ,
I want to creating a tracking section in my website with C#, Asp.Net on .Net framework 2.0, actually I want to track referral URL(as www.mysite/goto/dom) which redirect me to actual URL(www.mysite/abc/default.aspx?client=dom) I am able to track actual URL by Google Analytic code but having no control on referral URL(but I want to track them, Please help me regarding this issue or forward me any article)
Thanks.
Ahmad Abbas Khan
|
|
|
|
|
Hi
You can user the Request.UrlReferrer property to check the page that refereed to the current page.
Using this property for the Referrer URL you can build your own Analytics
|
|
|
|
|
I have alredy use below line..
string MyReferrer = Request.UrlReferrer.ToString();
but when I try it to localhost, it jumps to catch block for error.. is it because i am trying it on my localhost??(becuse referrer url only exist on live server)
.
.
.
My means to say what will it reaturn if referrer URL is not found??
Thanks a lot.
modified on Thursday, September 3, 2009 2:44 AM
|
|
|
|
|
Value in Request.UrlReferrer.ToString will be null if the page is opened directly.
Try using the below example
Create Page Default2.aspx
protected void Page_Load(object sender, EventArgs e)
{
if (Request.UrlReferrer != null)
{
string strref = Request.UrlReferrer.ToString();
}
Response.Write("<a href='default3.aspx'>Link</a>");
}
Create Page Default3.aspx
protected void Page_Load(object sender, EventArgs e)
{
if (Request.UrlReferrer != null)
{
Response.Write(Request.UrlReferrer.ToString());
}
}
You will get the Value in the 'UrlReferrer' Property
|
|
|
|
|
Thanks for your help….
With this code I am able to track the URL of page from where we are coming but not able to track that URL which are transfer by server , there is some mechanism on server as client entered www.mysite.com/goto/aman they transfer it to my actual url, and I want to know that how many user hits are done by this one (www.mysite.com/goto/aman) where we have no control.
Thanks again for your kind help,
Abbas
|
|
|
|
|
You can get the URL of current page from Request.URL
Study the Request Object.
|
|
|
|
|
|
Hi guys my 5 user controls i have mentioned in my aspx page...,
in one of the user control i have used timer control with in updatepanel...,
in my timer tick event the control getting refresh...,its affection all other user controls methods to...,
i have given updatepanel updatemode as conditional...,then also its affecting other user control methods...,
how to solve it...,
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
What is the scope of your timer, make sure its limited only for that specific page and not forcing a full page refresh.
|
|
|
|