Welcome to RP's venture...Here you can find some of the relative topics like ASP.Net, C#.Net,VB.Net, SQL Server, AJAX, Javascripts, Sharepoint, WPF, WCF, Silverlight, MVC, General knowledge, Jokes, Fun, Technical, Non-Technical etc.
0

Advantages of ASP.NET on ASP

Posted by Rajendra Prasad Panchati on Tuesday, February 23, 2010
ASP is interpreted, ASP.NET is compiled

Since ASP uses vb script, there is no compilation. All ASP pages are interpreted when th page is executed.

ASP.NET uses modern .NET languages like C#, VB.NET etc. They can be compiled to efficient Microsoft Intermediate Language (MSIL). When you compile an ASP.NET application, the server side code is compiled to assemblies. These assemblies are loaded at run time which makes the ASP.NET pages perform better than classic ASP.

ASP.NET has better language support, a large set of new controls, XML-based components, and better user authentication.

ASP.NET provides increased performance by running compiled code.

ASP.NET code is not fully backward compatible with ASP.
New in ASP.NET

* Better language support
* Programmable controls
* Event-driven programming
* XML-based components
* User authentication, with accounts and roles
* Higher scalability
* Increased performance - Compiled code
* Easier configuration and deployment
* Not fully ASP compatible

Language Support

ASP.NET uses ADO.NET.

ASP.NET supports full Visual Basic, not VBScript.

ASP.NET supports C# (C sharp) and C++.

ASP.NET supports JScript.

ASP.NET Controls

ASP.NET contains a large set of HTML controls. Almost all HTML elements on a page can be defined as ASP.NET control objects that can be controlled by scripts.

ASP.NET also contains a new set of object-oriented input controls, like programmable list-boxes and validation controls.

A new data grid control supports sorting, data paging, and everything you can expect from a dataset control.

Event Aware Controls

All ASP.NET objects on a Web page can expose events that can be processed by ASP.NET code.

Load, Click and Change events handled by code makes coding much simpler and much better organized.

ASP.NET Components

ASP.NET components are heavily based on XML. Like the new AD Rotator, that uses XML to store advertisement information and configuration.

User Authentication

ASP.NET supports form-based user authentication, cookie management, and automatic redirecting of unauthorized logins.

User Accounts and Roles

ASP.NET allows user accounts and roles, to give each user (with a given role) access to different server code and executables.

High Scalability

Much has been done with ASP.NET to provide greater scalability.

Server-to-server communication has been greatly enhanced, making it possible to scale an application over several servers. One example of this is the ability to run XML parsers, XSL transformations and even resource hungry session objects on other servers.

Compiled Code

The first request for an ASP.NET page on the server will compile the ASP.NET code and keep a cached copy in memory. The result of this is greatly increased performance.

Easy Configuration

Configuration of ASP.NET is done with plain text files.

Configuration files can be uploaded or changed while the application is running. No need to restart the server. No more metabase or registry puzzle.

Easy Deployment

No more server-restart to deploy or replace compiled code. ASP.NET simply redirects all new requests to the new code.

Compatibility

ASP.NET is not fully compatible with earlier versions of ASP, so most of the old ASP code will need some changes to run under ASP.NET.

To overcome this problem, ASP.NET uses a new file extension ".aspx". This will make ASP.NET applications able to run side by side with standard ASP applications on the same server.

|
0

Javascript Ajax call through Web Request

Posted by Rajendra Prasad Panchati on Tuesday, February 23, 2010
function webrequest(Your Parameters)// ajax call request function
{
var webRequest = new Sys.Net.WebRequest();
var baseUrl = "AjaxCallToPage.aspx";
webRequest.set_httpVerb("GET");
var newUrl = baseUrl + "?YourParameters";
webRequest.set_url(newUrl);
webRequest.add_completed(completed);
webRequest.invoke();
}

function completed(result, args)// response for ajax call request
{
if (result.get_responseAvailable())
{
var responseData = result.get_responseData();
if (responseData == YourCondition)
{

}
else
{

}
}
else
{
if(result.get_timedOut())
{
alert("Timed Out");
}
else
{
if (result.get_aborted())
{
alert("Aborted");
}
}
}
}

|
0

What is Dispose method in .NET?

Posted by Rajendra Prasad Panchati on Friday, February 19, 2010
The GC call the Finalize () function automatically to
destroy the object called implicit destroy. When you want
to destroy a objects that you think no longer need and free
it from memory, then we will use the dispose function. For
better
Performance we will use the dispose function explicitly.


The Dispose method in .NET belongs to IDisposable interface
and it is best used to release unmanaged objects like File
objects, Windows API objects, Database connection objects,
COM objects etc from the memory. Its performance is better
than the finalize() method.

|
0

Export data into a excel file.

Posted by Rajendra Prasad Panchati on Friday, February 19, 2010
string outputFile1 = "C:\\abc.xls";

FileInfo outputFileInfo1 = new FileInfo(outputFile1);
FileStream outfs1 = null;
if(outputFileInfo1.Exists)
outfs1 = outputFileInfo1.Open(FileMode.Open);
else
outfs1 = outputFileInfo1.Open(FileMode.CreateNew);
TextWriter tw1 = new StreamWriter(outfs1);

|
0

Virtual Keyword

Posted by Rajendra Prasad Panchati on Friday, February 19, 2010
The keyword virtual is applied to a method declaration to indicate that the method may be overridden in a subclass. If the virtual keyword is not applied and a method is defined in a subclass with the same signature as the one in the parent class, the method in the parent class is hidden by the subclass implementation.

|
0

Access Modifiers

Posted by Rajendra Prasad Panchati on Thursday, February 18, 2010
The access modifiers in .NET are

1. public

2. private

3. protected

4. internal

5. protected internal

public

Public means visible to everyone and everywhere.

Access cases

1. By objects of the class

2. By derived classes

private

Private means hidden and usable only by the class itself. No code using a class instance can access a private member and neither can a derived class. Information or functionality that will not be needed or has no meaning outside of the context of a specific class should be made private.

Access cases

1. Cannot be accessed by object

2. Cannot be accessed by derived classes

protected

Protected members are similar to private ones in that they are accessible only by the containing class. However, protected members also may be used by a descendant class. So members that are likely to be needed by a descendant class should be marked protected.

Access cases

1. Cannot be accessed by object

2. By derived classes

internal

Internal are public to the entire assembly but private to any outside assemblies. Internal is useful when you don't want to allow other assemblies to have the functionality.

Access cases

In same assembly (public).

1. By objects of the class

2. By derived classes

In other assembly (internal)

1. Cannot be accessed by object

2. Cannot be accessed by derived classes

protected internal

Finally, we have the only compound access modifier allowed in .NET. Members marked as protected internal may be accessed only by a descendant class that's contained in the same assembly as its base class. You use protected internal in situations where you want to deny access to parts of a class' functionality to any descendant classes found in other applications.

Note: that it's illegal to combine two access modifiers for a class but can only be applied to the members.

Access cases

In same assembly (protected).

1. Cannot be accessed by object

2. Can be accessed by a derived classes

In other assembly (internal)

1. Cannot be accessed by object

2. Cannot be accessed by derived classes

+------------------+---------+-----------+--------+----------+--------------------+
| | private | protected | public | internal | protected internal |
+------------------+---------+-----------+--------+----------+--------------------+
| By object | No | No | Yes | Yes | No |
+------------------+---------+-----------+--------+----------+--------------------+
| By derived class | No | Yes | Yes | Yes | Yes(Same assembly) |
+------------------+---------+-----------+--------+----------+--------------------+

|
0

OOPS Polymorphism

Posted by Rajendra Prasad Panchati on Wednesday, February 17, 2010
Polymorphism means same operation may behave differently on different classes.

Generally, it is the ability to appear in different forms. In oops concept, it is the ability to process objects differently depending on their data types. Its the ability to redefine methods for derived classes.

There Are Two Types of Polymorphism

1. Static Polymorphism
2. Dynamic Polymorphism

1. Static Polymorphism
In Static Polymorphism ,Which method is to be called is decided at compile-time only. Method Overloading is an example of Static Polymorphism.

Method overloading is a concept where we use the same method name many times in the same class,but different parameters. Depending on the parameters we pass, it is decided at compile-time only, which method is to calles. The same method name with the same parameters is an error and it is a case of duplication of methods which c# does not permits. In Static Polymorphism decision is taken at compile time.
Method Overloading is an example of Compile Time Polymorphism.

public Class CompileTime
{
public void Calculate(int x)
{
Console.WriteLine("Area of a Square: "+x*x);
}
public void Calculate(int x, int y)
{
Console.WriteLine("Area of a Rectangle: "+x*y);
}
public static void main()
{
CompileTime objCompileTime=new CompileTime();
objCompileTime.Calculate(2);
objCompileTime.Calculate(2,3);
}
}

Output : Area of a Square: 4 and Area of a Rectangle: 6.

2. Dyanamic Polymorphism
Method overriding occurs when child class declares a method that has the same type arguments as a method declared by one of its superclass.

In this Mechanism by which a call to an overridden function is resolved at a Run-Time( not at Compile-time). If a BaseClass contains a method that is overridden.
Method Overriding is an example of Run Time Polymorphism

Class Test
{
Public void Show()
{
Console.WriteLine("From base class");
}
}
Public Class RunTime: Test
{
Public void Show()
{
Console.WriteLine("From Derived Class");
}
Public static void main()
{
RunTime objRunTime=new RunTime();
objRunTime.Show();
}
}

Output : From Derived Class

|
0

Biulding Captcha image in C#.Net

Posted by Rajendra Prasad Panchati on Wednesday, February 17, 2010 in ,
Required Namespaces
    1)using System.Drawing;
    2)using System.Drawing.Text;
    3)using System.Drawing.Imaging;

We need a seperate aspx page for create captcha image and we need to call that aspx page to verify the text displaying in that image.

Simple way of building captcha image and using is as shown below.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BuildCaptcha.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>

</div>
</form>
</body>
</html>

Code file C#.Net

using System.Drawing;
using System.Drawing.Text;
using System.Drawing.Imaging;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Bitmap objBMP = new Bitmap(60, 20);
Graphics objGraphics = Graphics.FromImage(objBMP);
objGraphics.Clear(Color.Wheat);
objGraphics.TextRenderingHint = TextRenderingHint.AntiAlias;

//' Configure font to use for text
Font objFont = new Font("Arial", 8, FontStyle.Italic);
string randomStr = "";
char[] myArray = new char[5];
int x;

//That is to create the random # and add it to our string
Random autoRand = new Random();
for (x = 0; x < 5; x++) { myArray[x] = System.Convert.ToChar(autoRand.Next(65,90)); randomStr += (myArray[x].ToString()); } //This is to add the string to session, to be compared later Session.Add("RandomStr", randomStr); //' Write out the text objGraphics.DrawString(randomStr, objFont, Brushes.Red, 3, 3); //' Set the content type and return the image Response.ContentType = "image/GIF"; objBMP.Save(Response.OutputStream, ImageFormat.Gif); objFont.Dispose(); objGraphics.Dispose(); objBMP.Dispose(); } } Calling Page <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server>
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<img height="30" alt="" src="BuildCaptcha.aspx" width="80"/>
<asp:TextBox runat="Server" ID="txtCaptcha"/>
<asp:Button runat="Server" ID="btnSubmit" OnClick="btnSubmit_Click" Text="Submit" />
</div>
</form>
</body>
</html>

Calling page Code file C#.Net

public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void btnSubmit_Click(object sender, EventArgs e)
{
//On “btnSubmit_Click” place the following code
if (Page.IsValid && (txtCaptcha.Text.ToString() == Session["RandomStr"].ToString()))
{
Response.Write("Code verification Successful");
}
else
{
Response.Write("Please enter info correctly");
}

}
}

|
0

OOPs concepts

Posted by Rajendra Prasad Panchati on Wednesday, February 17, 2010 in
Object oriented Programming is a type of programming in which programmers define not only the data type of a data structure, but also the types of operations (functions) that can be applied to the data structure. In this way, the data structure becomes an object that includes both data and functions. In addition, programmers can create relationships between one object and another. For example, objects can inherit characteristics from other objects.

One of the principal advantages of object-oriented programming techniques over procedural programming techniques is that they enable programmers to create modules that do not need to be changed when a new type of object is added. A programmer can simply create a new object that inherits many of its features from existing objects. This makes object-oriented programs easier to modify.

Basic Concepts of OOP..

1)Class
2)Object
3)Method
4)Inheritance
5)Abstraction
6)Encapsulation
7)Polymorphism

In briefly,

Class :
A user-defined data structure that groups properties and methods. Class doesn’t occupies memory.

Object :
Instance of Class is called object. An object is created in memory using keyword
“new”.


1.Abstraction
2.Encapsulation
3.Inheritance
4.Polymorphisam

Abstraction:- Hidding non-essential features and showing the
essential features
(or)
Hidding unnecessary data from the users details, is called
abstraction.

Real Time example: TV Remote Button
in that number format and power buttons and other buttons
there just we are seeing the buttons, we don't see the
button circuits .i.e buttons circuits and wirings all are
hidden. so i think its good example.

Encapsulation:
Writing Operations and methods stored in a single
class. This is Called Encapsulation

Real Time Example: Medical Capsuals
i.e one drug is stored in buttom layer and another drug is
stored in Upper layer these two layers are combined in
single capsual.

Inheritance:
The New Class is Existing from Old Class, i.e SubClass is
Existing from Super Class.

Real Time Example:
Father and Son Relationship

Polymorphism:
Sinle Form behaving differently in different
Situations.

Example:-
Person
Person in Home act is husband/son,
in Office acts Employer.
in Public Good Citizen.

|
0

Javascript Simple AJAX call

Posted by Rajendra Prasad Panchati on Tuesday, February 16, 2010 in
var xmlHttp;
function RequestAjaxCall()
{
if (window.XMLHttpRequest)
xmlHttp = new XMLHttpRequest();
else if (window.ActiveXObject)
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.onreadystatechange = ResponseAJAXCall;
var str ="Param="+ConditionParam;//Condition to do an action
xmlHttp.open('POST', "Default.aspx?"+str, true);
xmlHttp.send("");
}

In between, you need to to grab the condition in your default.aspx page and do required operations and write as below in your Default.aspx.cs
Response.Write("Your Response");

Again write the response grab function in your javascript file as below. Function name should match with the request function on ready state change function name.

function ResponseAJAXCall()
{
if (xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete')
{
var respo = xmlHttp.responseText;
alert(respo);
}
}

|
0

Open a pop up with javascript

Posted by Rajendra Prasad Panchati on Tuesday, February 16, 2010 in
var path="Yourwebpage.aspx"
window.open(path,'Page Title to show' , 'fullscreen=no, toolbar=no, status=no, menubar=no,scrollbars=no,height=400,resizable=no,width=630,top=150, left=250, directories=no,location=no');

|
0

Javascript to Change all check boxes checked status in a grid with header check box checked change

Posted by Rajendra Prasad Panchati on Tuesday, February 16, 2010 in
function AllCheckBoxesCheckedStatusChange(chkbox_header_id, grid_id, chkbox_id)
{
var chkd = chkbox_header_id.checked;
var grid = document.getElementById(grid_id);
var rows = grid.rows.length;
for (var i=1;i {
if(i<9)
var j = "0"+ (i+1);
else
var j = i + 1;
if (document.getElementById(grid_id+"_ctl" + j + "_"+chkbox_id) != null)
document.getElementById(grid_id+"_ctl" + j + "_"+chkbox_id).checked = chkd;
}
}

|
0

Query excecution Using Stored Procedure

Posted by Rajendra Prasad Panchati on Monday, February 15, 2010 in
Here i'm using SQL Server as my database. So i needed 1)using System.Data; 2)using System.Data.SqlClient; namespaces.

try
{
String objConnectionString= ConfigurationSettings.AppSettings["ConnectionString"];
SqlConnection objSQLConnection = new SqlConnection(objConnectionString);
SqlCommand objSQLCommand = new SqlCommand();
objSQLCommand .Connection = objSQLConnection ;
objSQLCommand .CommandType = CommandType.StoredProcedure;
objSQLCommand .CommandText = "Your Stored Procedure name";
if(objSQLConnection .State==ConnectionState.Closed)
objSQLConnection .Open()
objSQLCommand .ExecuteNonQuery();
}
catch(Exception ex)
{
Throw ex;
}
finally
{
if(objSQLConnection .State==ConnectionState.Open)
objSQLConnection .Close()
}

|
0

Sending Mail functionality C#.Net

Posted by Rajendra Prasad Panchati on Monday, February 15, 2010 in
Required Namespaces : 1)using System.Net; 2)using System.Net.Mail;

Case 1: Mail send without Bcc, CC and without attachment

MailMessage objMailMessage = new MailMessage();

objMailMessage.From = new MailAddress(From Address, From Name);
objMailMessage.To.Add(To Address,To Name);
objMailMessage.Subject = Mail subject;
objMailMessage.IsBodyHtml = true;
objMailMessage.Body = Mail Body;

SmtpClient objSmtpClient = new SmtpClient(Your SMTP Client);
objSmtpClient.UseDefaultCredentials = false;
objSmtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
objSmtpClient.Credentials = new NetworkCredential(Your SMTP User,Your SMTP Password);
objSmtpClient.Send(objMailMessage);

Case 2: Mail send with Bcc, CC and without attachment

MailMessage objMailMessage = new MailMessage();

objMailMessage.From = new MailAddress(From Address, From Name);
objMailMessage.To.Add(To Address,To Name);
objMailMessage.Subject = Mail subject;
objMailMessage.IsBodyHtml = true;
objMailMessage.Body = Mail Body;

objMailMessage.Bcc.Add(Bcc Mail Id);//If Multiple Ids, ids should be devided by , (comma)
objMailMessage.CC.Add(CC Mail Id);//If Multiple Ids, ids should be devided by , (comma)

SmtpClient objSmtpClient = new SmtpClient(Your SMTP Client);
objSmtpClient.UseDefaultCredentials = false;
objSmtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
objSmtpClient.Credentials = new NetworkCredential(Your SMTP User,Your SMTP Password);
objSmtpClient.Send(objMailMessage);

Case 3: Mail send without Bcc, CC and with attachment

You may need using System.IO; namespace also for this type of mail sending if already not included.

MailMessage objMailMessage = new MailMessage();

objMailMessage.From = new MailAddress(From Address, From Name);
objMailMessage.To.Add(To Address,To Name);
objMailMessage.Subject = Mail subject;
objMailMessage.IsBodyHtml = true;
objMailMessage.Body = Mail Body;
objMailMessage.Attachment.Add(new Attachment(Your attachment Path));//You can attach multiple attachments

SmtpClient objSmtpClient = new SmtpClient(Your SMTP Client);
objSmtpClient.UseDefaultCredentials = false;
objSmtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
objSmtpClient.Credentials = new NetworkCredential(Your SMTP User,Your SMTP Password);
objSmtpClient.Send(objMailMessage);

|
0

Important National Highways

Posted by Rajendra Prasad Panchati on Thursday, February 11, 2010 in
SNo National Highways Connects
1 NH 1 New Delhi - Ambala - Jalandhar - Amritsar.
2 NH 2 Delhi - Mathura - Agra - Kanpur - Allahabad - Varanasi - Kolkata
3 NH 3 Agra - Gwalior - Nasik - Mumbai
4 NH 4 Thane and Chennai via Pune and Belgaun.
5 NH 5 Kolkata - Chennai
6 NH 6 Kolkata - Dhule
7 NH 7 Varanasi - Kanyakumari
8 NH 8 Delhi - Mumbai (Via Jaipur, Baroda and Ahmedabad)
9 NH 9 Mumbai - Vijaywada
10 NH 10 Delhi - Fazilka

|
0

Indian States International Boundaries

Posted by Rajendra Prasad Panchati on Thursday, February 11, 2010 in
1Bordering PakistanJammu and Kashmir, Punjab, Rajasthan, Gujarat.
2Bordering ChinaJammu and Kashmir, Himachal Pradesh, Uttaranchal, Sikkim, Arunachal Pradesh.
3Bordering NepalBihar, Uttaranchal, UP, Sikkim, West Bengal
4Bordering BangladeshWest Bengal, Mizoram, Meghalaya, Tripura, Assam
5Bordering BhutanWest Bengal, Sikkim, Arunachal Pradesh, Assam
6Bordering MyanmarArunachal Pradesh, Nagaland, Manipur, Mizoram
7Bordering AfghanistanJammu and Kashmir (Pakistan - occupied area)

|
0

ASP.Net Impersonation

Posted by Rajendra Prasad Panchati on Thursday, February 11, 2010 in
Impersonation is the concept of giving permission to do a specific action on system IO objects.
To enable impersonation, we need to change at System.web block as shown below
<identity impersonate="true" userName="username" password="password"/> in our project's web.config file.

|
0

SQL Trim Function

Posted by Rajendra Prasad Panchati on Thursday, February 11, 2010 in
TRIM : This command will removes the empty spaces surrounding to your string. Thsi is the combination of LTRIM & RTRIM commands.
Synatax: TRIM(Your String)
Ex: TRIM(' Your String ')
Output: 'Your String'

|
0

SQL Replace Function

Posted by Rajendra Prasad Panchati on Thursday, February 11, 2010 in
REPLACE : This function is used to replace partial or total string from your original string.
Syantax: REPLACE(base string,subString of base string,string to be replaced)
Ex: REPLACE('My Name is Rajendra",'Rajendra','Your Name')
Output: 'My Name is Your Name'.

|
0

Reference Books

Posted by Rajendra Prasad Panchati on Wednesday, February 10, 2010 in
You can download C#.Net coding standards book from here.

You can download Wrox programmer to programmer book from here

You can download DotNet sample interview questions book from here

You can download Microsoft SQL server concepts book from here

You can download Oops with DOTNET book from here

|
0

Predefined Keywords in C#.Net

Posted by Rajendra Prasad Panchati on Wednesday, February 10, 2010 in
Following is a table of (almost all) the keywords in C#.

abstract event new struct
as explicit null switch
base extern object this
bool false operator throw
break finally out true
byte fixed override try
case float params typeof
catch for private uint
char foreach protected ulong
checked goto public unchecked
class if readonly unsafe
const implicit ref ushort
continue in return using
decimal int sbyte virtual
default interface sealed volatile
delegate internal short void
do is sizeof while
double lock stackalloc
else long static
enum namespace string

|
0

Call a url with query strings included

Posted by Rajendra Prasad Panchati on Wednesday, February 10, 2010 in
From this method we can call a url with no.of query strings included and response will be sent in encrypted format as POST data type and response will be in decrypted data.

String responseParam = string.Empty;

Byte[] arrRequest;

Stream objStreamReq;
StreamReader objStreamRes;
System.Text.UTF8Encoding objUTFEncode = new System.Text.UTF8Encoding();

Uri uriObj = new Uri(Your Url);

WebRequest objWebReq = WebRequest.Create(uriObj);
WebResponse objWebRes;

objWebReq.Method = "POST";
objWebReq.ContentType = "application/x-www-form-urlencoded";
arrRequest = objUTFEncode.GetBytes(parameters);
objWebReq.ContentLength = arrRequest.Length;

objStreamReq = objWebReq.GetRequestStream();
objStreamReq.Write(arrRequest, 0, arrRequest.Length);
objStreamReq.Close();

objWebRes = objWebReq.GetResponse();
objStreamRes = new StreamReader(objWebRes.GetResponseStream(), System.Text.Encoding.ASCII);

responseParam = objStreamRes.ReadToEnd();
objStreamRes.Close();

|
0

Hotel to stay at better price

Posted by Rajendra Prasad Panchati on Tuesday, February 09, 2010 in
Bangalore    

Hotel Nandhini - Indiranagar

Church Street Inn

Prasidhi Stay Inn

Hotel Nandhini - Jayanagar

Hotel Nandhini - Minerva Circle

Hotel Nandhini - St. Mark's Road

Hotel Nandhini - J.P.Nagar

Hotel Nandhini - R.T.Nagar

Hotel Nandhini - White Field
Chennai

Goldmine Hotels
Hyderabad

Alpine Glow Residency Diplomat

Hotel Inner Circle

Hotel Ambassador

Hotel Nakshatra

Hotel NKM's Grand

Parklane Hotel

Hotel Rainbow International

Hotel Pearl Regency

Sri Madhura Inn

SG Comforts

Hotel Priya Residency

Hotel Geetanjali

SilverParkHotel

Hotel Raj International

Hotel Tanisha

Hotel Ritzy Orchid

Hotel Harsha

Stay Inn

Hotel Grandeur

Hotel Balaji Residency

Hotel Taj Tristar

Hotel Central Park

Hotel Heritage Inn

The Residency

Hotel Ring View

The Grand Solitaire

Kasani GR Hotel

Timesquare

Mapple Inn

Anmol Continental Hotel

Quality Inn

Hotel Sree Krishna Residency

Nand International

Hotel Manasvi

Peppermint Hotel

Hotel Sitara Grand

Hotel Mahaveer

Swagath De Royal

Swagath Grand Hotel

Hotel Tourist Plaza

Hotel Tureeya Grand

Hotel Kens

The Platinum Hotel

Hotel Woodbridge

Hotel IK London

Mandava Suites

Hotel Imperial Suites

Hotel Green Park

Orange Transit House

Hotel Royal Grand

Grand Plaza

Annapoorna Residency

Raj Classic Inn

Urvasi Residency

Hotel Manohar

One Place

Hotel Sai Prakash

Hotel Balajee Palace

Luxor Inn

Supreme Parkview

Hotel Baseraa

Atluri Suites

Supreme Deluxe

Hotel Gateway Hyderabad

The Pride Residency

Hotel Golden Point

Hotel Surya Residency

Ebony Boutique Hotel

Katriya Deroyal Hotel

Amogh Hotel Yatri Nivas

Hotel Rahul International

Amogh Hotel Urvasi

The Central Court Hotel

Amogh Boutique Hotel

Leo Continental

Alpine Glow Residency Sunrise

Hotel Golkonda
Tirupati

Hotel Bliss Tirupati

Hotel Bhimas Paradise

Hotel Bhimas

Sri Sai Residency

Hotel Sindhuri Park

Tirumala Residency

Kalyan Residency

Hotel PLR Grand
Gurgaon

Courtyard Residency
Visakhapatnam

The Grand Central Hotel

Hotel Rajdhani

|
0

Case sensitive search in SQL

Posted by Rajendra Prasad Panchati on Monday, February 08, 2010 in
           COLLATE is the Keyword which help you to compare case sensitivity.
Syntax: COLLATE (Collation Value)
EX: COLLATE SQL_Latin1_General_CP1_CS_AS
you should keep this part between the comparision statement
EX: SELECT * FROM USERS
WHERE USER_NAME COLLATE SQL_Latin1_General_CP1_CS_A = 'Your String'....

You can get the Collation Value from the properties of your database on which you are currently working..
Your Database-->Properties-->General(Under Maintenance).

|
0

Delete duplicate records from database

Posted by Rajendra Prasad Panchati on Monday, February 08, 2010 in
              I and with the help of my friend, discovered a simple method to delete duplicate set(s) of records from a table in your database.

SELECT DISTINCT * INTO Temp_Table FROM Your_Table
DROP TABLE Your_Table
SELECT * INTO Your_Table FROM Temp_Table
DROP TABLE Temp_Table

|
0

3-Tier architecture in ASP.Net

Posted by Rajendra Prasad Panchati on Monday, February 08, 2010 in
                    3-Tier architecture generally contains UI or Presentation Layer, Business Access Layer (BAL) or Business Logic Layer and Data Access Layer (DAL).

Presentation Layer (UI)
Presentation layer cotains pages like .aspx or windows form where data is presented to the user or input is taken from the user.

Business Access Layer (BAL) or Business Logic Layer
BAL contains business logic, validations or calculations related with the data, if needed.

Data Access Layer (DAL)
DAL contains methods that helps business layer to connect the data and perform required action, might be returning data or manipulating data (insert, update, delete etc).

|

About Me