This is a discussion on Check domain name availability in ASP.NET within the ASP and ASP.NET Programming forums, part of the Web Development category; Check domain name availability in ASP.NET Domain verification Goals: This project is used to verify the domain that it ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Check domain name availability in ASP.NET Domain verification Goals: This project is used to verify the domain that it is present on the webserver Steps: 1) create a C# web application. 2) In the aspx page create textbox, literal and button. 3) type the following code in the aspx.cs file System.Net.HttpWebRequest req; System.Net.HttpWebResponse res; System.IO.StreamReader r; string pge; string url = "http://" + domain.Text; if (IsPostBack) { try { req = (System.Net.HttpWebRequest)HttpWebRequest.Create(u rl); req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)"; res = (System.Net.HttpWebResponse)req.GetResponse(); r = new System.IO.StreamReader(res.GetResponseStream()); pge = r.ReadToEnd(); r.Close(); res.Close(); ErrMSG.Text = ""; } catch (Exception ex) { ErrMSG.Text = "Domain is not available"; } finally { if (ErrMSG.Text == "") { ErrMSG.Text = "Domain is available"; } } } |
| Sponsored Links |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/asp-asp-net-programming/2086-check-domain-name-availability-asp-net.html | |||
| Posted By | For | Type | Date |
| domain hosting name web - Check domain name availability in ASP.NET | This thread | Refback | 07-18-2007 09:33 AM |
| domain hosting web - Check domain name availability in ASP.NET | This thread | Refback | 07-18-2007 09:33 AM |
| domain name hosting - Check domain name availability in ASP.NET | This thread | Refback | 07-18-2007 09:32 AM |
| domain name web hosting - Check domain name availability in ASP.NET | This thread | Refback | 07-18-2007 09:32 AM |
| domain web hosting - Check domain name availability in ASP.NET | This thread | Refback | 07-18-2007 09:30 AM |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Redirect domain.com/abc -> abc.domain.com | Kamalakannan | PHP Programming | 0 | 07-17-2007 08:17 AM |
| Web content check | tripnautic | HTML, CSS and Javascript Coding Techniques | 2 | 05-01-2007 06:56 AM |
| How to check the URL testing? | vadivelanvaidyanathan | Software Testing | 2 | 04-13-2007 04:58 AM |
| Checkout Availability | nhoj | 0 | 04-09-2007 01:46 PM | |
| Which domain you think looks better? | webmaster | General Web hosting Discussions | 8 | 03-15-2007 12:48 AM |