Solved

Url encoding in asp.net&c#

Posted on 2011-02-18
7
1,025 Views
Last Modified: 2012-05-11
Hi, I want to code for the url encoding in asp.net(c#).My aim is for example my site is www.example.com/register.aspx.Iin Browser Url "register.aspx cannot show in users browser instead of that register.aspx user can see any encoded format.Please give the code and explain how?
0
Comment
Question by:Manne
  • 3
  • 3
7 Comments
 
LVL 2

Expert Comment

by:jondow
ID: 34924989
Hi, not sure I completely understtod the question but this is how to url encode:

Server.UrlEncode("www.example.com/register.aspx")

0
 

Author Comment

by:Manne
ID: 34925018
i mean in browser user dont see the register.aspx in browser Address bar.
0
 
LVL 12

Expert Comment

by:Mamtha1982
ID: 34925052
Encoding is not possible in the URL. But you can use other feature called "routing" which will hide the physical asp.net page and allowes you to customize the URL.

Below is the download:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=D5CDD637-AC85-4522-B8D5-D17B5B064614&displaylang=en

0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 12

Accepted Solution

by:
Mamtha1982 earned 500 total points
ID: 34925061
0
 

Author Comment

by:Manne
ID: 34931523
is Routing concept  available in .net 3.5 only?
0
 
LVL 12

Expert Comment

by:Mamtha1982
ID: 34932720
Yes, URL routing was first time introduced in ASP.NET 3.5 SP1.
0
 

Author Comment

by:Manne
ID: 34996289

When iam trying url routing this error occur..

Server Error in '/url_rout' Application.
--------------------------------------------------------------------------------

The route handler 'RouteHandler' did not return an IHttpHandler from its GetHttpHandler() method.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The route handler 'RouteHandler' did not return an IHttpHandler from its GetHttpHandler() method.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[InvalidOperationException: The route handler 'RouteHandler' did not return an IHttpHandler from its GetHttpHandler() method.]
   System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +15588
   System.Web.Routing.UrlRoutingModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e) +81
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +216
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +120

 
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now