How to get URL without querystring

VB.NET Dim stringUri As String = ‘http://www.syncfusion.com/?id=1&auid=16’ Dim weburi As Uri = New Uri(stringUri) Dim query As String = weburi.Query Dim weburl As String = stringUri.Substring(0, stringUri.Length – query.Length) Response.Write(weburl) C# string stringUri = ‘http://www.syncfusion.com/?id=1&auid=16’; Uri weburi = new Uri(stringUri); string query = weburi.Query; string weburl = stringUri.Substring(0, stringUri.Length – query.Length); Response.Write (weburl);

How can I save images ?

You need a stream to read the response, WebResponse.GetResponseStream(), and a stream to write it to the hard drive. FileStream should do the trick. You’ll have to write to the filestream what you read from the response stream.

What is HttpHandler

An HttpHandler is a class that handles HTTP requests. In ASP.Net a Page class, for example, is the default HttpHandler for files with a .aspx extension. You can map different file extensions to different HttpHandlers in ASP.Net. When the web server receives a request for a file, it looks in its configuration to find out whether a special HttpHandler has been designated for that file extension. ASP.Net provides the HttpHandler class to extend the functionality of ASP.net to be able to handle requests for other file types (extensions). In IIS, you make ASP.Net the HttpHandler for the type of file that you desire, and use the web.config file for your web to identify what DLL (Class Library) is used to handle specific file extensions. The HttpHandler is a class that handles the request. It has access to the same HttpContext (Request, Response, Cookies, Session, Application, Server, etc) that the Page class does. For more detailed information, see: HttpHandlers