//Read the External Web Pages Details
WebRequest reg = WebRequest.Create("http://www.google.com");
WebResponse resp = reg.GetResponse();
Stream st = resp.GetResponseStream();
StreamReader stR = new StreamReader(st,Encoding.ASCII );
string StrTest = stR.ReadToEnd();
Response.Write(StrTest);
Wednesday, October 22, 2008
SQL SERVER - Database Coding Standards and Guidelines
The following URL it will help to Standards Coding style
http://blog.sqlauthority.com/2007/06/04/sql-server-database-coding-standards-and-guidelines-part-1/
http://blog.sqlauthority.com/2007/06/04/sql-server-database-coding-standards-and-guidelines-part-1/
.NET Framework AJAX Update Panel Problem
Sys.WebForms.PageRequestManagerParserErrorException:
The message received from the server could not be parsed.
Common causes for this error are when the response is modified by calls to Response.Write(),
response filters, HttpModules, or server trace is enabled.
Details: Error parsing near'
// Use Javascript
string url = Your URL;
string redirectURL = Page.ResolveClientUrl(url);
string script = "window.location = '" + redirectURL + "';";
ScriptManager.RegisterStartupScript(this, typeof(Page), "RedirectTo", script, true);
The message received from the server could not be parsed.
Common causes for this error are when the response is modified by calls to Response.Write(),
response filters, HttpModules, or server trace is enabled.
Details: Error parsing near'
// Use Javascript
string url = Your URL;
string redirectURL = Page.ResolveClientUrl(url);
string script = "window.location = '" + redirectURL + "';";
ScriptManager.RegisterStartupScript(this, typeof(Page), "RedirectTo", script, true);
Tuesday, October 21, 2008
Get WebSite IP details in C#.NET
// Include System.NET
IPHostEntry ip = Dns.GetHostByName("www.testsitename.com");
IPAddress [] IPDetails=ip.AddressList;
for (int i = 0; i < IPDetails.Length; i++)
{
Response.Write("IP Address :"+ IPDetails[i].ToString());
}
string [] ipHost = ip.Aliases;
for (int i = 0; i < ipHost.Length; i++)
{
Response.Write("
Aliase Name :" + ipHost[i].ToString());
}
IPHostEntry ip = Dns.GetHostByName("www.testsitename.com");
IPAddress [] IPDetails=ip.AddressList;
for (int i = 0; i < IPDetails.Length; i++)
{
Response.Write("IP Address :"+ IPDetails[i].ToString());
}
string [] ipHost = ip.Aliases;
for (int i = 0; i < ipHost.Length; i++)
{
Response.Write("
Aliase Name :" + ipHost[i].ToString());
}
Wednesday, October 15, 2008
Add Script Handler to IIS 7(Vista) for Ajax Control Tool Kit
If Ajax Control toolkit is not working in IIS7 or Windows Vista, Verify the Http Handler in web configuration file
"httpHandlers"
"add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/"
"/httpHandlers"
If Configuration file is fine,Add the following handler to IIS Handler Mappting
IIS 7 - > Handler Mapping -> Add Managed Handler
Request Path: ScriptResource.axd
Type: System.Web.Handlers.ScriptResourceHandler
Verbs: GET,POST,HEAD,DEBUG
Now Check AJAX is working Fine.
Monday, October 13, 2008
SEO Tips
Be bold. Use the tags around some of your keywords on each page. Do NOT use them everywhere the keyword appears. Once or twice is plenty.
Deep linking. Make sure you have links coming in to as many pages as possible. What does it tell a search engine when other web sites are linking to different pages on your site? That you obviously have lots of worthwhile content. What does it tell a search engine that all your links are coming in to the home page? That you have a shallow site of little value, or that your links were generated by automation rather than by the value of your site. Here is an example of deep linking, in this case to my personal happiness workbook.
Become a foreigner. Canada and the UK have many directories for websites of companies based in those countries. Can you get a business address in one of those countries?
Newsletters. Offer articles to ezine publishers that archive their ezines. The links stay live often for many years in their archives.
First come, first served. If you must have image links in your navigation bar, include also text links. However, make sure the text links show up first in the source code, because search engine robots will follow the first link they find to any particular page. They won't follow additional links to the same page. You can see this in action at the link to the home page on this web site monitoring page
Multiple domains. If you have several topics that could each support their own website, it might be worth having multiple domains. Why? First, search engines usually list only one page per domain for any given search, and you might warrant two. Second, directories usually accept only home pages, so you can get more directory listings this way. Why not a site dedicated to gumbo pudding pops?
Article exchanges. You've heard of link exchanges, useless as they generally are. Article exchanges are like link exchanges, only much more useful. You publish someone else's article on the history of pudding pops with a link back to their site. They publish your article on the top ten pudding pop flavors in Viet Nam, with a link back to your site. You both have content. You both get high quality links. (More on high quality links in other tips.)
Titles for links. Links can get titles, too. Not only does this help visually impaired surfers know where you are sending them, but some search engines figure this into their relevancy for a page.
Not anchor text. Don't overdo the anchor text. You don't want all your inbound links looking the same, because that looks like automation - something Google frowns upon. Use your URL sometimes, your company name other times, "Gumbo Pudding Pop" occasionally, "Get gumbo pudding pops" as well, "Gumbo-flavored pudding pops" some other times, etc.
Site map. A big site needs a site map, which should be linked to from every page on the site. This will help the search engine robots find every page with just two clicks. A small site needs a site map, too. It's called the navigation bar. See how the second navigation bar at the bottom of Last Minute Florida Villas is like a mini-site map?
Deep linking. Make sure you have links coming in to as many pages as possible. What does it tell a search engine when other web sites are linking to different pages on your site? That you obviously have lots of worthwhile content. What does it tell a search engine that all your links are coming in to the home page? That you have a shallow site of little value, or that your links were generated by automation rather than by the value of your site. Here is an example of deep linking, in this case to my personal happiness workbook.
Become a foreigner. Canada and the UK have many directories for websites of companies based in those countries. Can you get a business address in one of those countries?
Newsletters. Offer articles to ezine publishers that archive their ezines. The links stay live often for many years in their archives.
First come, first served. If you must have image links in your navigation bar, include also text links. However, make sure the text links show up first in the source code, because search engine robots will follow the first link they find to any particular page. They won't follow additional links to the same page. You can see this in action at the link to the home page on this web site monitoring page
Multiple domains. If you have several topics that could each support their own website, it might be worth having multiple domains. Why? First, search engines usually list only one page per domain for any given search, and you might warrant two. Second, directories usually accept only home pages, so you can get more directory listings this way. Why not a site dedicated to gumbo pudding pops?
Article exchanges. You've heard of link exchanges, useless as they generally are. Article exchanges are like link exchanges, only much more useful. You publish someone else's article on the history of pudding pops with a link back to their site. They publish your article on the top ten pudding pop flavors in Viet Nam, with a link back to your site. You both have content. You both get high quality links. (More on high quality links in other tips.)
Titles for links. Links can get titles, too. Not only does this help visually impaired surfers know where you are sending them, but some search engines figure this into their relevancy for a page.
Not anchor text. Don't overdo the anchor text. You don't want all your inbound links looking the same, because that looks like automation - something Google frowns upon. Use your URL sometimes, your company name other times, "Gumbo Pudding Pop" occasionally, "Get gumbo pudding pops" as well, "Gumbo-flavored pudding pops" some other times, etc.
Site map. A big site needs a site map, which should be linked to from every page on the site. This will help the search engine robots find every page with just two clicks. A small site needs a site map, too. It's called the navigation bar. See how the second navigation bar at the bottom of Last Minute Florida Villas is like a mini-site map?
SEO Tips
1.If you don’t want too much competition from other SEO’s, choose your keywords precisely. For example, Instead of keyowrd Loan choose keywords like Bank Loan, Equity Loan, Student Loan, Home Loan etc. Order of keyword also matter for search engines. Search engine treats “Loan Equity” and “Equity Loan” as different keywords.
2.Best seo practice is to get at least one of your primary keywords in domain or sub domain name of your website.You can use hyphens (-) to separate multiple keywords.For example: seo-service, seo-guidelines, free-seo each cover two keyords.
3.Get your second or third keywords in your directory name and filename. For example http://www.hiddentricks.com/seo/free-tips.html is best for keyword “free seo tips” , “seo hidden tricks” or "free seo tricks"
4.Keep your webpage free from any syntax error, declare document type at the beginning and validate your HTML and CSS because search engine don’t like pages with too many errors.
5.Give a short Title in of your page in 3-9 words (60-80 characters) maximum in length containing your primary keyword.Remember it will be displayed in search results so choose wisely.
6.Try to include your most important keyword phrases in heading tags on your page if you can but keep in mind it should not be exactly same as title of your page. You can use (H1 H2 H3) tag for specifying anything important. To reduce size of heading use CSS.
7.Specify Meta keywords in heading of document. Limit it to 15 to 20 words. Although not all the search engines give importance but there is no harm doing it. Search engine like Yahoo still give it importance.
8.Write Your Meta Description tag attractive containing keywords because it will appear on the search engine result pages.
9.Use text for navigation menu instead of using images or Java scripts.
10.Try to include your most important keyword in hyperlinked text and text and text that immediately precedes or follows the hyperlink. Do not use same keyword always use synonyms at few places.Jusk like instead of seo, I have use search engine optimization at many places on this page.
11.If you are using images then use “alt” attribute to describe your image with proper keyword.
12.One of the best webmaster guideline is to submit sitemap of your website to make sure all pages of your website are indexed by search engine crawlers.
13.Keep size of your webpages less than 50KB so it is downloaded fast and visitors don’t have to wait for long. For good SEO site page size ideal should be 15KB.
14.Try to avoid your content in Flash, frame, images, java script because crawler find it very difficult and it is against seo tips and guidelines.
15.Don’t use dynamic url because it don’t contain keywords so its not search engine friendly. If you are using any script which shows dynamic pages then make sure at least it should include one keyword.
16.Don’t try to spam and never use methods like cloaking, keyword spamming or doorway pages. Many seo advices to have multiple domain name and link each other but according to our SEO tips and guidelines search engine can penalize you for this.Instead of that try to add more quality content to your existing website.
17.Submit your website only once to google, Yahoo, AltaVista and other search engines and open directory.Don’t use any script or website for automatic submission.
18.If your website contents changes very often then provide visitor with Newsletter and RSS feed.
19.Write articles on website related to yours having higher page ranking and leave your websites link.
20.Get link from other sites related to yours, search engine consider it as vote in your favour.
2.Best seo practice is to get at least one of your primary keywords in domain or sub domain name of your website.You can use hyphens (-) to separate multiple keywords.For example: seo-service, seo-guidelines, free-seo each cover two keyords.
3.Get your second or third keywords in your directory name and filename. For example http://www.hiddentricks.com/seo/free-tips.html is best for keyword “free seo tips” , “seo hidden tricks” or "free seo tricks"
4.Keep your webpage free from any syntax error, declare document type at the beginning and validate your HTML and CSS because search engine don’t like pages with too many errors.
5.Give a short Title in of your page in 3-9 words (60-80 characters) maximum in length containing your primary keyword.Remember it will be displayed in search results so choose wisely.
6.Try to include your most important keyword phrases in heading tags on your page if you can but keep in mind it should not be exactly same as title of your page. You can use (H1 H2 H3) tag for specifying anything important. To reduce size of heading use CSS.
7.Specify Meta keywords in heading of document. Limit it to 15 to 20 words. Although not all the search engines give importance but there is no harm doing it. Search engine like Yahoo still give it importance.
8.Write Your Meta Description tag attractive containing keywords because it will appear on the search engine result pages.
9.Use text for navigation menu instead of using images or Java scripts.
10.Try to include your most important keyword in hyperlinked text and text and text that immediately precedes or follows the hyperlink. Do not use same keyword always use synonyms at few places.Jusk like instead of seo, I have use search engine optimization at many places on this page.
11.If you are using images then use “alt” attribute to describe your image with proper keyword.
12.One of the best webmaster guideline is to submit sitemap of your website to make sure all pages of your website are indexed by search engine crawlers.
13.Keep size of your webpages less than 50KB so it is downloaded fast and visitors don’t have to wait for long. For good SEO site page size ideal should be 15KB.
14.Try to avoid your content in Flash, frame, images, java script because crawler find it very difficult and it is against seo tips and guidelines.
15.Don’t use dynamic url because it don’t contain keywords so its not search engine friendly. If you are using any script which shows dynamic pages then make sure at least it should include one keyword.
16.Don’t try to spam and never use methods like cloaking, keyword spamming or doorway pages. Many seo advices to have multiple domain name and link each other but according to our SEO tips and guidelines search engine can penalize you for this.Instead of that try to add more quality content to your existing website.
17.Submit your website only once to google, Yahoo, AltaVista and other search engines and open directory.Don’t use any script or website for automatic submission.
18.If your website contents changes very often then provide visitor with Newsletter and RSS feed.
19.Write articles on website related to yours having higher page ranking and leave your websites link.
20.Get link from other sites related to yours, search engine consider it as vote in your favour.
Friday, October 3, 2008
Javascript
What is the difference between validation control in ASP.NET and JavaScript validation Code?
Javascript
What is the diffrence between validation control in ASP.NET and Javascript validation Code?
Subscribe to:
Posts (Atom)