C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Problem with UriBuilder


Posted Date: 22 May 2008    Resource Type: Errors and Solutions    Category: General
Author: Pramod N. PawarMember Level: Gold    
Rating: Points: 10



I was trying to build url using UriBuilder class and facing issue when url has querystring parameters.
E.g.
string urlstring = "http://localhost/productdetails.aspx?id=123&alpha={a}
UriBuilder uri = new UriBuilder(urlstring);

if you directly give this url to UriBuilder then it converts all wildcard characters to unicode values and hence wont get apporiate result.

to get url try with this:
urlstring= uri.ToString();

if(urlstring.contains(?))
urlstring= HttpUtility.UrlDecode(urlstring);

this will again gives you appropriate format.

thanks.









Responses

Author: Jessie    01 Jul 2008Member Level: Gold   Points : 1
For the first time i heard about URIBuilder through your post. Good information.

Can you let me know what is difference between

http://localhost/first.aspx?id=5 and http://localhost/first.aspx?id={5}


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Commit() error while using PopupControlExtender of AjaxToolKit
Previous Resource: ERROR:The transport failed to connect to the server
Return to Discussion Resource Index
Post New Resource
Category: General


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use