Infolink

 

Search This Blog

Dec 19, 2012

SqlParameter in asp.net

I have a web service, so the handler is called multiple times concurrently all the time.

Inside I create SqlConnection and SqlCommand. I have to execute about 7 different commands. Different commands require various parameters, so I just add them once:

How to Add Meta Description and Keywords to Blogger:

How to Add Meta Description and Keywords to Blogger:
  •     Login to your blogger blog
  •     Goto Design and after that Edit Html
  •     Add the following code
<meta content=’your description here’ name=’description’/>

<meta content=’your keywords here’ name=’keywords’/>


Click Save Template. Now you added meta tags to your blogger blog. The description and keywords will be showed on every posts.

How to Add Unique Meta Description and Keywords to Blogger:

Just Change the code like this :-
Add Meta Description:

<meta expr:content=’data:blog.pageName + data:blog.title + data:blog.pageName’ name=’Description’/>

The above code will add your Blog post’s title and Blog title as your Meta description of blog posts.
Add Meta Keywords:

<meta expr:content=’data:blog.pageName + data:blog.title + data:blog.pageName’ name=’Keywords’/>

The above code will add your Blog post’s title and Blog title as your post’s Meta Keywords.

The unique meta description / keywords / tags for blogger blog should improve your blog post’s search engine rankings. But, keep in mind don’t add many title tag in your meta description. Because, this may be  irritate your post.

How to connect to an external SQL server database in ASP.NET / VB.NET / .NET

Connecting to databases in .NET is different if you are coming from other languages such as PHP. To connect to a database in ASP.NET / .NET in general, you use "Connection Strings" that essentially is the connection information to the database.

First and foremost, in your code behind file within an ASP.NET application (or simply the .vb or .cs file of your .NET desktop application), you will need to first import the namespace that has the relevant database-related classes and methods, etc.

Dec 7, 2012

Static classes

C# 2.0 now supports static classes. Here are static classes properties.

1) A static class cannot be instantiated. That means you cannot create an instance of a static class using new operator.
2) A static class is a sealed class. That means you cannot inherit any class from a static class.
3) A static class can have static members only. Having non-static member will generate a compiler error.
4) A static class is less resource consuming and faster to compile and execute.

C# Event Handlers and Delegates

C# Event Handlers and Delegates in ASP .Net with Web User Controls

This article should help as a general how to on event handlers and delegates in C# as well as propose a different way to handle cross page methods in your ASP .Net website from a web user control or other page.

Create event handlers and their delegates in the user control, fire them from the methods tied to the internal controls protected events, and define the methods that will handle the new events in the page (see code below).

This article should help as a general how to on event handlers and delegates in C# as well as propose a different way to handle cross page methods in your ASP .Net website from a web user control or other page.

Dec 2, 2012

How to migrate your ASP.NET site to the Azure cloud

Cloud computing is one of the hot topics of 2011 with those willing to make the jump to a cloud-based solution finding financial savings in this new approach as well as, in many cases, better fault tolerance and a more responsive service turnaround in many cases. However, what many developers may not realise is just how straightforward it can be to migrate a web site from a local or hosted server into the cloud.

To demonstrate, this article will show you how to upgrade and deploy an existing ASP.NET 3.5 or 4.0 web application to the Windows Azure cloud platform.

We will cover:
  1. The SDKs and tools to be installed on your machine before you can continue
  2. How to set up your Windows Azure instance in preparation for the application
  3. How to alter the application so that it will function in the cloud
  4. How to deploy the application to Windows Azure
Related Posts Plugin for WordPress, Blogger...