Monday, December 29, 2008

Selecting particular row from gridview

protected void grdview_srchresult_SelectedIndexChanged(object sender, EventArgs e) {

//for MessageBox
//Page.RegisterStartupScript("StatusMessage", "
");
GridViewRow gd = grdview_srchresult.SelectedRow;
Response.Write(gd.Cells[1].Text.ToString());//zipcode
}

protected void grdview_srchresult_RowDataBound(object sender, GridViewRowEventArgs e) {
if (e.Row.RowType == DataControlRowType.DataRow)
{
//for designing gridview
e.Row.Attributes["onmouseover"] = "this.style.cursor='hand';this.style.background='#D1DDF1'";
e.Row.Attributes["onmouseout"] = "this.style.textDecoration='none';this.style.background='#EFF3FB'";

//for selecting particular record
e.Row.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(this.grdview_srchresult, "Select$" + e.Row.RowIndex );
}
}

Wednesday, December 17, 2008

Example for XMLSerializer

This Program is used to create diferent type of values like textbox,lablebox,datagrid into xml file format

//Serialization

TextBox1.Text = "VIJAY WELCOMES U";
XmlSerializer xmlserial = new XmlSerializer(TextBox1.Text.GetType ());
FileStream fs = File.Create("C:\\vijay.xml");
xmlserial.Serialize(fs, TextBox1.Text);
fs.Close();

//Deserialization

object a;
XmlSerializer xmlserial1 = new XmlSerializer(TextBox1.Text.GetType());
FileStream fs1 = File.OpenRead("C:\\vijay.xml");
a=xmlserial1.Deserialize(fs1);
TextBox2.Text = (Convert.ToString(a));
fs1.Close();

Output ill be:

In xml file:
Below line ill show in xml format tag with in tag name "string"
VIJAY WELCOMES U

In form:
VIJAY WELCOMES U-- TextBox1
VIJAY WELCOMES U-- TextBox2

Thursday, December 11, 2008

Tuesday, December 9, 2008

Open Control panel items via Run Command

In some system admin restrict control panel to view. we have a esay method to access item from control panel without opening control panel window...


if u want to chage a date/time property use the following steps..

Strat-->Run-->timedate.cpl and hit Enter

if u want to know more abt that just select

strat-->serach-->enter *.cpl in serach box and hit search it will show all the files with .cpl extension

Thursday, December 4, 2008

Coding for Accessing xml file using javascript

var xml_doc_variable;
function read_xml_file(file_name)
{
xml_doc_variable=new ActiveXObject"Microsoft.XMLDOM");
xml_doc_variable.async=false;
xml_doc_variable.load(file_name);
var xml_doc_values=xml_doc_variable.getElementsByTagName("company");
var xml_value=xml_doc_values[0].getElementsByTagName("employee");
var user_name=xml_value[0].firstChild.nodeValue);//accessing values from specified tag
var text_box_value=document.getElementById('t1');
if(username==text_box_value)
alert('rite user');
else
alert('wrong user');
document.write(xml_value[0].getAttribute("id"));//getting value of attribute
}

Tuesday, December 2, 2008

Coding for Calling Css File using javascript

function select_fun(filename)
{
var file_name_script=filename+".css";
var file_ref=document.createElement("link"); //use for creating link tag
file_ref.setAttribute("rel","StyleSheet");
file_ref.setAttribute("type","text/css");
file_ref.setAttribute("href",file_name_script);
document.getElementsByTagName("head")[0].appendChild(file_ref);//used for appending css link tag to head tag
}

Note:

if u want to call any script file replace "script" by "link" in document.createElement("link");



//coding for changing css style automatically in random using setTimeout()
var i_count_value=0;
var j_count_value=0;
file_name_script='glow.css';
select_fun();
function select_fun()
{
if(file_name_script=='blur.css')
{
i_count_value++;
file_name_script='glow.css';
}
else if(file_name_script=='glow.css')
{
j_count_value++;
file_name_script='blur.css';
}
var file_ref=document.createElement("link");
file_ref.setAttribute("rel","StyleSheet");
file_ref.setAttribute("type","text/css");
file_ref.setAttribute("href",file_name_script);
document.getElementsByTagName("head")[0].appendChild(file_ref);
if(j_count_value>=16)
{
history.go(); //used to refresh page
}
var a=setTimeout("select_fun()",800);
}

//css files

//blur.css
h5
{
height:50;
width:400;
font-size:30pt;
font-weight:bold;
color:orange;
filter:Blur(Direction=1, Strength=8)
}

//glow.css
h5
{
height:50;
width:400;
font-size:30pt;
font-weight:bold;
filter:Glow(Color=green, strength=6)
}


List of Filter Property Values (Functions)

alpha -- Set transparency properties for an element This filter sets the level of opacity for an element. This can be a constant value, or it can be 'blended' across an element (i.e., an alpha gradient) using a variety of different styles.

blendtrans -- Fade the element into or out of view This dynamic filter is used to fade an element and its content into and out of view: parameters control the speed and duration of the fading effect.

blur -- Blur the element and its content This filter is used to blur the content of an element. Parameters can control the degree of blurring, and the direction in which the blur is applied.

chroma -- Make a single color transparent This filter takes the form filter: chroma(color="rrggbb); , and sets the indicated color to be transparent. Dynamic scripts can use this to change the color that is transparent. The value rrggbb can be either an RGB code (#rrggbb) or a known color name.

dropshadow -- Add a drop shadow to the element text This filter creates a drop shadow effect for the text content of an element. Various supported parameters define the direction and size of the shadow. This is only supported by the div, marquee, span, table, td and th elements.

fliph -- Horizontally flip the element This filter has no parameters and takes the form: filter: fliph(); . This flips or "mirrors" the element horizontally.

flipv -- Vertically flip the element Adds radiance around the outer edge of an element . filter: flipv(); . This flips or "mirrors" the element vertically.

glow -- Add radiance around text letters This filter adds a radiant glow around the text content of an element. The parameter color sets the glow color (e.g. color=green), while the parameter strength sets the size for the glow( zero to 100). This has no effect if a background color or image is applied to the element.

gray -- Render element in grayscale This filter has no parameters and takes the form: filter: gray(); . This transforms the element and content to a grayscale palette.

invert -- Inverts colors in the element This filter has no parameters and takes the form: filter: invert(); . This transforms the element and content such that each color is replaced by the color with the opposite hue, saturation and brightness.

light -- Simulated light source projected on the element This filter creates the effect of a simulated light source shining down on the element content. Parameters define the type of light source (color, shape, strength) and the position of the source.

mask -- Remasks transparent pixels. element This filter takes the selected element content, paints the transparent pixels using the color specified by the color property, and changes all the nontransparent pixels to be transparent. This takes only one parameter, color, to set the color.
redirect -- Allow animation using Microsoft DirectAnimation™ components. This filter Converts the object into a DAImage object which can then be manipulated using Microsoft's DirectAnimation controls. Of course, this requires that the DirectAnimation browser component, be invoked in the Web page. This is typically done by referencing the appropriate DLL using an object element.

revealtrans -- Show or hide an element and its content This filter defines one of 23 defined transitions that can hide or reveal the element content. Parameters define the type of transition, its duration, and the nature of the transition (e.g., stops after one transition loop).

shadow -- Paint a shadow around the element content This filter paints a shadow around the selected element content. Parameters define the color of the shadow, and the direction in which the shadow should be applied.

wave -- Apply a sine-wave distortion to the element This filter applies a sine-wave distortion to the element and its content. Parameters define the magnitude and frequency of the wave, and the strength (amplitude, color, etc.) of the distortion.

xray -- Create X-ray effect This filter has no parameters and takes the form: filter: xray(); . This changes the color depth of the display, and renders the element content in black and white, making it look like a black-and-white x-ray.

Monday, December 1, 2008

Text Effect using css

















Text Effect Of Glow

h6 {
height:50;
width:400;
font-size:20pt;
font-weight:bold;
filter:Glow(Color=#FFFF00, strength=10)
}

Text Effect of Blur

h5 {
height:50;
width:400;
font-size:20pt;
font-weight:bold;
filter:Blur(Direction=1, Strength=8)
}

Text Effect of Shadow

h4{
height:50;
color:orange;
width:400;
font-size:20pt;
font-weight:bold;
filter:shadow(Color=green)
}

Rotate text in horizontal position
h6{
height:50;
width:400;
font-size:20pt;
font-weight:bold;
filter:fliph()
}

Rotate text in vertical position
h6{
height:50;
width:400;
font-size:20pt;
font-weight:bold;
filter:fliph()
}







Designing IE Scrollbar Color using css

html {
scrollbar-face-color:orange;
scrollbar-shadow-color: blue;
scrollbar-highlight-color: green;
scrollbar-3dlight-color:green;
scrollbar-darkshadow-color: white;
scrollbar-track-color:white;
scrollbar-arrow-color:white;
}

Note:
if u want to hide a scroll bar just place same color name for all attributes...

Thursday, November 20, 2008

Secure ur computer more than user login screen

using "syskey" command for creating extra security layer for ur system.

Start->Run->syskey->select update button to enter ur password

then select Password Startup option and enter password and it confirm,then select ok.

Now u restart ur system. startup password screen diplsay after window xp logo screen displayed.

Monday, November 17, 2008

Code for logout process

Place the below code in form_load function

Response.AddHeader("Cache-control", "no-store, must-revalidate, private,no-cache"); Response.AddHeader("Pragma", "no-cache");
Response.AddHeader("Expires", "0");

Friday, November 14, 2008

Create Folder without any name

Create new Folder-> Select Rename->Hold alt key and type 0160 in number pad...


If u want to know ascii value of A-z and a-z just do like same what we did above..

Create Folder->Select Rename->Hold alt+65 then it display corressponding character in ur folder name.

Monday, November 10, 2008

Easily hacking by google

If u want to know about index of any webpage,music,ebooks etc

use the following command in google search box and hit enter

"?intitle:index.of?type category u want searchitem name"

for ex:
if u want to know about gmail
"?intitle:index.of?mail gmail"

if u want to know abt music
"?intitle:index.of?music raaga" try this

Saturday, November 8, 2008

create PDF file using C#.net

use below link to download pdfsharp dll file

http://sourceforge.net/projects/pdfsharp/

download the file and add reference to ur program then only u can create pdf file


code:

using System;
using System.Diagnostics;
using System.IO;
using PdfSharp;
using PdfSharp.Drawing;
using PdfSharp.Pdf;
using PdfSharp.Pdf.IO;
namespace HelloWorld
{
class Program
{
[STAThread] static void Main(string[] args)
{

// Create a new PDF document
PdfDocument document = new PdfDocument();

// Create an empty page
PdfPage page = document.AddPage();

// Get an XGraphics object for drawing
XGraphics gfx = XGraphics.FromPdfPage(page);

XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.Unicode, PdfFontEmbedding.Always);

// Create a font
XFont font = new XFont("Arial", 20, XFontStyle.Bold, options);

// Draw the text
gfx.DrawString("Hello, World!", font, XBrushes.Black, new XRect(0, 0, page.Width, page.Height), XStringFormats.Center);

// Save the document...
string filename = "HelloWorld.pdf";
document.Save(filename);

// ...and start a viewer.
Process.Start(filename);
}
}
}

How to search in google easily

www.google.com/codesearch

Use this id to check how can search easily in google.

Friday, November 7, 2008

Command for Shutdown System from Command Prompt

Here i Post how to shtdown,logoff,abort shutdown process using Command Prompt

Get into cmd using start->run->cmd->click Enter

Cmd window open here.

type shutdown -s : this statement for shutdown the system

shutdown -l : this statment for logoff the system

shutdown -a : aborting shutdown process

shutdown -m\\computername : this statement for shutdown remote system

if u need to know full options about shutdown command type shutdown /?

How to Create a New User in Windows Xp without Accessing Another login But Through Command prompt

This is very useful to create admin without entering into windows Screen.

Normally we crearte new user from start->control panel->user account

Ths method is quit interesting to create your own account with out entering into windows screen.

Step to create user Account:

1. when system get boot press F8 function key to get a windows choice menu
2. From that select "COMMAND PROMPT OPTION"
3. After getting Command Prompt use "NET USER" Command to Create account.

EX:

if u need any help about NET USER. u Can Use NET USER ?
NET USER username /add password

if u want delete existing account or any other account
NET USER Accoutname /delete

Wednesday, October 22, 2008

Coding for Sending mail from gmail address using c#.net

Using System.Web.Mail;

MailMessage Mail = new MailMessage();
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", "smtp.gmail.com");
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "465");
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", "2");
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate","1");
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "vijayfreak@gmail.com");
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "Type ur passwor here");
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "true");
try
{
Mail.To = "vijayfreak@yahoo.co.in";
Mail.From = "vijay@test.com";
Mail.Subject = "Test message";
Mail.Body = "Test message";
Mail.Cc = "vijayfreak@gmail.com,vijay_mckvm@yahoo.co.in";
MailAttachment m = new MailAttachment("C:\\Documents and Settings\\A\\Desktop\\images.jpg");
Mail.Attachments.Add(m);
SmtpMail.SmtpServer = "smtp.gmail.com:456";
SmtpMail.Send(Mail);
}
catch (Exception ex)
{
Response.Write(ex.ToString() );
}

Wednesday, October 8, 2008

Coding for Google Map Using JavaScript

use this coding with script tag

"http://maps.google.com/maps?file=api&v=2&key=abcdefg"
type="text/javascript"

Here Closing script tag

open another script tag

"function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(22.853145, 80.507813),5);
}
}"
closing script tag

Thursday, September 25, 2008

Coding for changing form background color using CSS

public void Menu_Color_Selection_Method()
{
string color_name = DropDownList1.SelectedValue.ToString();
string path = "CSS\\";
string filename = color_name.ToString();
string extension = ".css";
stylesheet.Href = path + filename + extension;
Image1.ImageUrl = "images\\" + color_name + "_image.jpg";
}

Monday, September 22, 2008

Coding for Accessing Database File USing Code file with DataTable

Note:Place below code in App Folder



using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
///
/// Summary description for Class1
///

public class Class1
{
SqlConnection myconn;
string name,name_copy,ss;
string myConnstr;

public void sql_connection()
{

}
public Class1()
{

}

public DataTable execQuery(string myVarSQL)
{
// added SqlCommand Object 2004-02-02 to control command timeout;
SqlConnection myConn = new SqlConnection("Data Source=.;Initial Catalog=ctsi_web;Integrated Security=True");
myConn.Open();
SqlCommand myCmd = new SqlCommand(myVarSQL, myConn);
//myCmd.CommandTimeout = myCmdTimeout;
myCmd.CommandType = CommandType.Text;
SqlDataAdapter myDA = new SqlDataAdapter(myCmd);


DataTable myDT = new DataTable();
myDA.Fill(myDT);
myConn.Close();
return myDT;
}

}

Code For Filename.aspx.cs file



using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class Default2 : System.Web.UI.Page
{
Class1 global_declaration = new Class1();
DataTable dt = new DataTable();//creating new Table
protected void Page_Load(object sender, EventArgs e)
{
dt = global_declaration.execQuery("exec sample");//"sample" is a store procedure
foreach(DataRow dr in dt.Rows)//copying all data in datatable and acess from that datatable for Time Consuming
{
string name = dr["Menu_Index"].ToString();
Response.Write("THE VALUES ARE :" + name.ToString());
}

}
}

Coding For Creating Main menu and Sub menus at run time

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class samples : System.Web.UI.Page
{
#region variables_used
static int i;
static string names;
string main_menu_name;
int j;
string[] arr_name = new string[4];
string value;
string index_value;
#endregion

#region SQL_CONNECTION_STRING
SqlConnection con_header = new SqlConnection("Data Source=.;Initial Catalog=ctsi_web;Integrated Security=True");
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=ctsi_web;Integrated Security=True");
#endregion

#region Methods_Used

public void sub_menu()
{
con.Open();
SqlCommand cmd = new SqlCommand("select * from master_submenus where Menu_Index='" + names.ToString() + "'", con);
SqlDataReader dr = cmd.ExecuteReader();

while (dr.Read())
{


TableRow tr = new TableRow();
tr.BackColor = System.Drawing.Color.Tomato;


TableCell tc = new TableCell();
tc.ForeColor = System.Drawing.Color.White;
tc.BackColor = System.Drawing.Color.Tomato;
string sub_menu = dr["Sub_Menu_Names"].ToString();
string url = dr["URL"].ToString();
tc.Text = "" + sub_menu.ToString() + "";

string name = dr["Sub_Menu_Names"].ToString();
tr.Cells.Add(tc);

Table2.Rows.Add(tr);

Response.Write("
");



}
//table design style
TableItemStyle tableStyle = new TableItemStyle();
tableStyle.HorizontalAlign = HorizontalAlign.Left;
tableStyle.VerticalAlign = VerticalAlign.Middle;
tableStyle.Width = Unit.Pixel(700);

//aplying design style for table1
foreach (TableRow r in Table1.Rows)
foreach (TableCell c in r.Cells)
c.ApplyStyle(tableStyle);

con.Close();
}
#endregion


protected void Page_Load(object sender, EventArgs e)
{

con_header.Open();//for main menu connection
SqlCommand cmd_header = new SqlCommand("select * from master_mainmenu", con_header);
SqlDataReader dr_header = cmd_header.ExecuteReader();

while (dr_header.Read())
{
//place main menu items in table 1

TableRow tr_header = new TableRow();
TableCell tc_header = new TableCell();

tc_header.BackColor = System.Drawing.Color.Chocolate;
main_menu_name = dr_header["Menu_Names"].ToString();
index_value = dr_header["Menu_Index"].ToString();

//create link for main menu items
tc_header.Text = "" + main_menu_name.ToString() + "";
tr_header.Cells.Add(tc_header);
Table1.Rows.Add(tr_header);
i = i + 1;
names = subOpt.Value.ToString();
}

//calling sub_menu creation Function
sub_menu();

//table design style
TableItemStyle tableStyle = new TableItemStyle();
tableStyle.HorizontalAlign = HorizontalAlign.Center;
tableStyle.VerticalAlign = VerticalAlign.Middle;
tableStyle.Width = Unit.Pixel(200);

//aplying design style for table1
foreach (TableRow r in Table1.Rows)
foreach (TableCell c in r.Cells)
c.ApplyStyle(tableStyle);

//aplying design style for table2
foreach (TableRow rr in Table2.Rows)
foreach (TableCell cc in rr.Cells)
cc.ApplyStyle(tableStyle);
}
}

Tuesday, September 16, 2008

coding for downloading file using c#.net

Using System.Net;

// for Downloading file from net
WebClient c = new WebClient();//for accessing net client
string s = c.DownloadString("http://www.w3schools.com");//read all string from given URL
Response.Write(s.ToString()); //view the page

// path name to download file //paht name to save a file
c.DownloadFile("http://w3schools.com/html/default.asp", "C:\\Documents and Settings\\Administrator\\My Documents\\vijay_programs\\w3schools_index.asp");

coding for Encoding and Decoding

//encode
string data = "a";
byte[] encData_byte = new byte[data.Length];
encData_byte = System.Text.Encoding.UTF8.GetBytes(data);
string encodedData = Convert.ToBase64String(encData_byte);
Response.Write(encodedData.ToString());

//decode

System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding();
System.Text.Decoder utf8Decode = encoder.GetDecoder();

byte[] todecode_byte = Convert.FromBase64String(encodedData.ToString());
int charCount = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length);
char[] decoded_char = new char[charCount];
utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0);
string result = new String(decoded_char);
Response.Write(result.ToString());

Wednesday, August 27, 2008

Slide Show Using Javascript

"// The list of images to display in the slideshow"
//creating a array of the image object
"var image=new Array("images/image1.jpg",
"images/image2.jpg",
"images/image3.jpg",
"images/image4.jpg",
"images/image5.jpg",
"images/image6.jpg",
"images/image7.jpg",
"images/image8.jpg",
"images/image9.jpg",
"images/image10.jpg"

" )"

//variable that will increment through the images
"var num=0"

// set the delay between images
var timeDelay

//preload the images in the cache so that the images load faster
//create new instance of images in memory

var imagePreload=new Array()
"for (i=0;i{
imagePreload[i]=new Image()
// set the src attribute
imagePreload[i].src=image[i]
}






//for automatic Slideshow of the Images
function slideshow_automatic()
{

if (num {
num++
//if last image is reached,display the first image
if (num==image.length)
num=0

//sets the timer value to 4 seconds,we can create a timing loop by using the setTimeout method
timeDelay=setTimeout("slideshow_automatic()",4000)
document.images.slideShow.src=image[num]
}


}"

Monday, August 18, 2008

Coding For Printing Page using java script













Coding:


"with in a href tage use coding giving below"

"javascript:window.print()"

below print s used as lable for link....
PRINT
finall close "a href"

Wednesday, July 30, 2008

binding xml values in gridview

using System.Xml;
using System.Data.SqlClient;

protected void Page_Load(object sender, EventArgs e)
{
DataSet ds = new DataSet();
ds.ReadXml(MapPath("XMLFile.xml"));
GridView1.DataSource = ds;
GridView1.DataBind();
}

Thursday, May 8, 2008

Animation using javascript

Define tml tags and script tags
"TIGER" means image box id.

var TigerTimer;
function AnimateTiger()
{
clearInterval(TigerTimer);
document.getElementById("TIGER").style.left = "600px";
TigerTimer = setInterval("MoveTiger()", 20);
}
function MoveTiger()
{
document.getElementById("TIGER").style.pixelLeft -= 2;
if (document.getElementById("TIGER").style.pixelLeft <= 0) {
document.getElementById("TIGER").style.left = "600px";

}
}

Thursday, April 24, 2008

Selecting checkbox in gridview and select values from gridview rows





CheckBox ch = (CheckBox)GridView1.HeaderRow.FindControl("CheckBox1");
if (ch.Checked == true)
{
foreach (GridViewRow gv in GridView1.Rows)
{
ch2 = (CheckBox)gv.FindControl("CheckBox2");

ch2.Checked = true;
string workordernum = gv.Cells[1].Text;
string name = gv.Cells[2].Text;
string dept = gv.Cells[3].Text;
string workorder = gv.Cells[4].Text;
string equipment = gv.Cells[5].Text;
string worktype = gv.Cells[6].Text;
con.Open();
Label6.Text = "insert into jobapprove values('" + Label5.Text.ToString() + "','" + workordernum.ToString() + "','" + name.ToString() + "','" + dept.ToString() + "','" + workorder.ToString() + "','" + equipment.ToString() + "','" + worktype.ToString() + "')";
SqlCommand cmdd = new SqlCommand("insert into jobapprove values('" + Label5.Text.ToString() + "','" + workordernum.ToString() + "','" + name.ToString() + "','" + dept.ToString() + "','" + workorder.ToString() + "','" + equipment.ToString() + "','" + worktype.ToString() + "')", con);
cmdd.ExecuteNonQuery();
con.Close();
}
}
if (ch.Checked == false )
{
foreach (GridViewRow gv in GridView1.Rows)
{
ch2 = (CheckBox)gv.FindControl("CheckBox2");
ch2.Checked = false;
}
}


Coding For selecting Entire Checkbox while selecting Checkbox in Gridview HeaderRow

ch = (CheckBox)GridView1.HeaderRow.FindControl("CheckBox2");
foreach (GridViewRow gr in GridView1.Rows)
{
if (ch.Checked == true)
{
CheckBox ch1 = (CheckBox)gr.FindControl("CheckBox1");
ch1.Checked = true;
}
else if (ch.Checked == false)
{
CheckBox ch1 = (CheckBox)gr.FindControl("CheckBox1");
ch1.Checked = false;
}

}

Friday, April 18, 2008

Send a Parameter from a form to show in Report Viewer

Things are do before running this from






using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;
using System.Data.SqlClient;
public partial class _Default : System.Web.UI.Page

{
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=vijay;Integrated Security=True");
private ReportDocument rep=new ReportDocument ();
//protected override void unload(object sender, EventArgs e)
//{
// base.OnUnload(e);
// this.Unload += new EventHandler(Page.Unload);
//}
protected void page_unload()
{
rep.Clone();
rep.Dispose();
}
protected void Page_Load(object sender, EventArgs e)
{rep.Load (Server.MapPath ("CrystalReport1.rpt"));
rep.FileName = Server.MapPath("CrystalReport1.rpt");
if (!IsPostBack)

{
binddata();
}

}
public void binddata()
{
SqlDataAdapter dr = new SqlDataAdapter("select * from sample", con);
DataSet ds = new DataSet();
dr.Fill(ds);
DropDownList1.DataSource = ds;
DropDownList1.Items.Insert(0, "Select");
DropDownList1.DataTextField = "username";
DropDownList1.DataValueField = "username";
DropDownList1.DataBind();

DropDownList2.DataSource = ds;
DropDownList2.Items.Insert(0, "Select");
DropDownList2.DataTextField = "num";
DropDownList2.DataValueField = "num";
DropDownList2.DataBind();
}
protected void Button1_Click(object sender, EventArgs e)
{
Button1.Text = "Connect";
//string name = DropDownList1.SelectedValue.ToString();
//int num = Convert.ToInt32(DropDownList2.SelectedValue);
if (Button1.Text == "Connect")
{
Button1.Text = "View Report";
string name = TextBox1.Text;
int num = Convert.ToInt32(TextBox2.Text.ToString());
rep.SetParameterValue("name", name);
rep.SetParameterValue("num", num);
CrystalReportViewer1.ReportSource = rep;
}
}
}

Wednesday, March 26, 2008

Text To Speech

Download and install the Microsoft Speech SDK
Create a new project in Visual Studio
Add a reference to the Microsoft Speech Object Library COM object
Use the following code to record your speech to a .wav file…


SpeechLib.SpFileStream SpeechFileStream;
SpeechFileStream = new SpeechLib.SpFileStreamClass();
SpeechFileStream.Open(@"c:\test.wav", SpeechLib.SpeechStreamFileMode.SSFMCreateForWrite, false);
SpeechLib.SpVoice spv = new SpeechLib.SpVoice();
spv.AudioOutputStream = SpeechFileStream;
spv.Speak("I'm alive!", SpeechLib.SpeechVoiceSpeakFlags.SVSFDefault);
SpeechFileStream.Close();

PDF creation using c#.net

PDFCreatorPilot3Lib.PDFDocument3Class PDF = new PDFCreatorPilot3Lib.PDFDocument3Class();

// initialize PDF Engine

PDF.StartEngine("demo@demo", "demo");

// set filename

PDF.FileName = "TestCSHARP.PDF";

PDF.AutoLaunch = true; // auto-open generated pdf document

// start document generation

PDF.BeginDoc();

// draw "HELLO, PDF" message on the current PDF page

PDF.PDFPAGE_SetActiveFont("Verdana", true, false, false, false, 14, 0);

PDF.PDFPAGE_TextOut(10, 20, 0, "HELLO, PDF!");

// finalize document generation

PDF.EndDoc();

Types of Normalizations

1NF: Eliminate Repeating Groups

Make a separate table for each set of related attributes, and give each table a primary key. Each field contains at most one value from its attribute domain.

2NF: Eliminate Redundant Data

If an attribute depends on only part of a multi-valued key, remove it to a separate table.

3NF: Eliminate Columns Not Dependent On Key

If attributes do not contribute to a description of the key, remove them to a separate table. All attributes must be directly dependent on the primary key

BCNF: Boyce-Codd Normal Form

If there are non-trivial dependencies between candidate key attributes, separate them out into distinct tables.

4NF: Isolate Independent Multiple Relationships

No table may contain two or more 1:n or n:m relationships that are not directly related.

5NF: Isolate Semantically Related Multiple Relationships

There may be practical constrains on information that justify separating logically related many-to-many relationships.


ONF: Optimal Normal Form

A model limited to only simple (elemental) facts, as expressed in Object Role Model notation.

DKNF: Domain-Key Normal Form
A model free from all modification anomalies.

Remember, these normalization guidelines are cumulative. For a database to be in 3NF, it must first fulfill all the criteria of a 2NF and 1NF database.

sending mail from Sql Server 2005

step1 Enable the Database Mail feature on Sql Server 2005 with the following Statements.

USE MASTER
GO
SP_CONFIGURE 'SHOW ADVANCED OPTIONS',1
GO
RECONFIGURE WITH OVERRIDE
GO
SP_CONFIGURE 'DATABASE MAIL XPS',1
GO
RECONFIGURE
GO


step 2. Using the sysmail_add_account procedure to Create Database account .

EXECUTE msdb.dbo.sysmail_add_account_sp
@account_name = 'Admin', -- Account Name on SMTP (User Defined)
@description = 'Mail Account for Database Mail',-- Account mail description. (User Defined)
@email_address = 'shivaraj.gk@gmail.com',-- Mail sender E-mail address (User Defined)
@display_name = ‘Admin', -- Mail Sender display name, which displays, when mail received by recipient (User Defined)
@username=’ ’, -- SMTP Sever User Name
@password='', -- SMTP Server Password
@mailserver_name = '190.160.110.50' -- SMTP Server Address.




Step3: Using the sysmail_add_profile procedure to create a Database Mail profile.
EXECUTE msdb.dbo.sysmail_add_profile_sp
@profile_name = 'XXXXXXXX' –-Profile Name to add on SMTP Server(User Defined)
@description = 'Profile used for Database Mail'--Profile Description (User Defined)



Step4: Now execute the sysmail_add_profileaccount procedure, to add the Database Mail account, which created in step 2, to the Database Mail profile, which created in step 3.

EXECUTE msdb.dbo.sysmail_add_profileaccount_sp
@profile_name = 'XXXXXXXX', –-Profile Name on SMTP Server(User Defined)
@account_name = 'Admin', Account Name on SMTP (User Defined)
@sequence_number = 1


Step5: Use the sysmail_add_principalprofile procedure to grant the Database Mail profile access to the msdb public database role and to make the profile the default Database Mail profile..

EXECUTE msdb.dbo.sysmail_add_principalprofile_sp
@profile_name = 'XXXXXXXX',
@principal_name = 'public',
@is_default = 1 ;


Step6: Now send a test email from SQL Server using sp_send_dbmail procedure..

DECLARE @Message AS VARCHAR(100)
SET @ Message ='Server :' + @@servername+ ' My First Database Email '
EXECUTE msdb.dbo.sp_send_dbmail
@recipients=' Shivaraj.gk@gmail.com', --Mail Recipient E-mail address (User Defined)
@subject = 'Hi, dear......Test Mail from Sql Server 2005',--Subject for the Mail
@body =@ Message, --Body of the Mail
@body_format = 'HTML'; --Body Format(HTML/Text)


Step7: You can check the configuration of the Database Mail profile and account using SQL Server Management Studio by right clicking Database Mail and clicking the Configuration..


Step8: The log related to Database Mail can be viewed by executing the statement below..


SELECT * FROM msdb.dbo.sysmail_event_log

Top Ten New and Exciting Features in ASP.NET 2.0

ASP.NET 1.0 was a revolutionary advance in developing Web Applications. With its fully complied, highly extensible Server-Side control model, it was one of the best applications of Microsoft’s .NET runtime. It solved many of the issues plaguing ASP developers, and kept the development-centric philosophy that made ASP such a huge hit amongst the web-client community.

But problems remained with the ASP.NET 1.0 release, not an entirely unexpected situation given it was, after all, a 1.0 product. Developers found themselves writing a lot more code than they thought was good, and it was more difficult than it should have been to keep presentation and business logic well-partitioned and separate.

With ASP.NET 2.0, the ASP.NET team has continued to lead the way in making developer’s daily lives more enjoyable. The main theme of ASP.NET 2.0 seems to be “write less code”. In this article, with homage to David Letterman, we will count down my top ten favorite features of this new runtime. (Feel free to imagine the top ten list being enthusiastically read by Bill Gates, but of course, in your imagination he will only be reading the topics themselves—I will be reading the actual explanations.)

With no further ado, we begin, as always, with:


10) Application-wide registration of custom controls.
One of my biggest complaints about custom controls (and this was true of both UserControls and custom controls from a custom assembly) was that you had to put a “<%@ Register %>” directive at the top of every .aspx page from which you wanted to declare an instance of the control.

One of the main purposes of custom controls was to be able to use them from multiple .aspx pages in one application. Since controls typically encapsulate elements like menus, site navigation etc., it seems counterintuitive to me that in order to reuse that code, you have to add something to each and every page. But in ASP.NET 1.0, there has to be one Register directive for each assembly/namespace combination and one for each UserControl. If you need to add a new custom control, you have to go into every page where you want to use it, and add it manually.

In ASP.NET 2.0, you can add the Register directives to the web.config.





tagPrefix="jonishappy"
namespace="JonIsHappyNamespace"/>





You might wonder, if I was so worked up over it in ASP.NET 1.0, why it is number 10 on my list and not number 1? To be fair, despite my ranting, it was annoying, but not really life-threatening. It usually wasn't too hard to find the problem in the first place, and a simple cut-and-paste operation usually fixed the problem in seconds.


9) Programmable Configuration.
This is really a .NET runtime improvement, but it is still a big win for ASP.NET. The web.config file contains all the configuration information for an ASP.NET application. In ASP.NET 1.0, in order to change something (like a database connection string in the AppSettings element) you have to open the web.config file in the text editor of your choice.

With the new version, you can go into the configuration programmatically (without having to resort to manipulating the XML directly) and change the settings of your ASP.NET applications. This makes building things like installers, administration modules, and pages much easier.


8) Web Part controls.
Even though the personalization craze of the web has somewhat died down in recent years, there still are plenty of situations in which you will need to expose customization of pages to your end users.

With Web Parts, the ASP.NET team has given us a way to do that without writing any additional code. The WebPartZone control is used to define an “area” of the page that can be customized. Each zone can be made up of multiple parts which can be a ContentWebPart control, a custom control, or a UserControl. Used in conjunction with the WebPartManager controls, you can give your end users the ability to change where the controls in their page are displayed.


7) Posting to other pages.
One programming paradigm that ASP.NET 1.0 developers had to get used to was that the HTML forms in ASP.NET 1.0 had to have their action attribute refer back to the page that created the rendered page.

This wasn’t so much a limitation on functionality, since with Response.Redirect or Server.Transfer, moving a user from one page to the other was just a matter of maintaining the page’s state for the second page to retrieve. But it was a nuisance just slightly above the @Register directive on the annoyance scale.

ASP.NET 2.0 gives controls that cause a post-back to the server the ability to change the action of the form in the HTML page, causing the page’s state and data to be posted directly to an ASP.NET page other than the one that created it.

In the ASP.NET where you are declaring the server-side controls you set the PostBackUrl property to the aspx page you’d like the form to submit to.

In the second page you can retrieve the data the user inputted into the HTML form rendered by the first page by accessing the PreviousPage property and finding each control you’d like to get data from.


6) SQL Cache Dependency.
The ASP.NET 1.0 HttpCache class was a great feature for maintaining application-level state. One of the coolest features was the ability to create a dependency between an object you placed into the cache with another object, a file, or a directory.

Since frequently the object that you put into the cache related back to a table in your database, probably the question I got asked the most often when lecturing on ASP.NET was whether an object put into the cache could be invalidated when the underlying table changed. The answer in ASP.NET 1.0 was no. The new answer is yes.

To make this work, you first have to configure the SQL Server instance using the aspnet_regsql.exe command line tool. Then create an instance of the SqlCacheDependency class and add that into the Cache object when adding your data to the Cache.


5) Master Pages.
Using implementation inheritance was a cornerstone of the ASP.NET 1.0 model. Each .aspx page was compiled into a .NET class, and System.Web.UI.Page was that class’ eventual base class.

One oft-used technique in ASP.NET 1.0 was to create a “master page class”. This class derived from Page and generally had all the common functionality that each and every .aspx page in an application needed to use. It was trivial to get ASP.NET to use this class as the base class for all classes generated from your .aspx files.

Since ASP.NET is a framework to create user interfaces, the downside of this “master base class” model was that any server-side controls that were added dynamically via this class wouldn’t appear in the .aspx file designer in Visual Studio .NET.

In ASP.NET 2.0 there is a new feature called Master Pages. Master Pages are essentially ASP.NET syntax in a file with the .master extension. A Master Page can be created and serves the same purpose as the “master base class”. There are two main differences with the Master Page model.

One, the .master pages are visually designable. Not only that, when a .aspx page uses a Master Page, the visual elements from the Master Page are displayed in the design view of the .aspx page – grayed out.

Two, the Master Page isn’t used as the base class for the .aspx file.


4) Visual Studio .NET project model.
One complaint that was heard around the world about ASP.NET 1.0 wasn’t really an ASP.NET problem, but a Visual Studio .NET (VS.NET) problem. Although ASP.NET supposed a number of different compilation and deployment models, VS.NET was fairly myopic in its view of how everyone should develop ASP.NET web applications. VS.NET’s model wasn’t wrong for every scenario, but it was wrong in enough instances to warrant a fairly bad rap when developing ASP.NET.

In ASP.NET 2.0, VS.NET (specifically VS.NET 2005) is much more flexible. It is flexible in terms of what part of an ASP.NET application may be open in the IDE at one time (no more solution files). VS.NET 2005 allows you to use a “codebehind” file or not, it is up to you, where VS.NET 2002/2003 both strictly enforced the “codebehind” file model.


3) Visual Studio .NET /ASP.NET compilation model.
In close connection with item number 4, VS.NET 2005 also frees the intrepid developer to compile at will. In fact, late compilation is the norm with 2005, which again is the opposite of the 2002/2003 model.

Part of this new lax view towards compilation goes hand in hand with new features built into ASP.NET 2.0. ASP.NET 2.0 takes advantage of the new feature built into C# and the CLR itself which allows a class to be defined in multiple files. Essentially, instead of “codebehind”, we now have “codebeside”, in which the class created from the .aspx file gets compiled into the same class that can exist in another file. This straightens out some of the weird object-oriented weirdness that sometimes ensued because of ASP.NET 1.0’s derived (.aspx ) base class (“codebehind”) model.

Also with ASP.NET 2.0 there is a command line compiler (aspnet_compile) that allows you to precompile a whole ASP.NET application. This feature is also exposed with a specialized handler which can be found at the precompile.axd endpoint in your application.


2) Provider model.
When the ASP.NET team looked at the code being written in the real world, they saw many chunks of code they felt they could build into the runtime itself. Many of these chunks need some data to back up the UI. Of course the ASP.NET team couldn’t choose a data source for every application, nor should they. So they used a layer of indirection.

This layer is known as a provider. A provider sits between the UI piece (the ASP.NET server-side control) and the data (which could be an ADO.NET data source, an XML file, or something else). The provider generally derives from a specific base class and that base class has methods that the UI piece can call to get the data necessary to render itself. ASP.NET 2.0 ships with providers for the most common types of data. If you have a different data source, you are free to build your own provider.

One standout example is membership. For membership, ASP.NET 2.0 ships a provider for Access and SQL Server, and a set of controls that allow logins, account creation, account editing, password reminders, etc. Building a gated web site with these new controls and a provider is really a snap. Expect to see more of this functionality unfold over time.


1) Declarative Databinding.
In ASP.NET 1.0, Databinding was one of the top features. Freeing developers from looping over rows of data and concatenating strings to generate HTML by allowing a control to just take a data object and run with it, with the rendered HTML being created based upon properties set on the control, was a genius idea. The only slight problem was that in order to make Databinding work, we still had to write code.

In ASP.NET 2.0, they introduce the concept of Declarative Databinding, which essentially allows you to declare the properties you want on your data source with the same declarative model you use to declare the server-side controls themselves. Datasource objects are created in the same way as server-side controls, by dragging and dropping them from the toolbox, or by adding the declaration to the .aspx file. Once configured, a datasource can be bound to a data-bound control.

Clearly, there are a lot more than just 10 new features in the ASP.NET 2.0 release; we could easily have turned this into a Top Twenty, Top Fifty or even Top One Hundred list, had we wanted. ASP.NET marks a huge new set of functionality, driven by customer demands and requests, and your Top Ten list will likely differ from my own, depending on your experience and history with ASP.NET. But in the meantime, while you're building your own list, try starting with these 10—I think you'll like these new features just as much as I do.

The following are the some limitations of Sql server table.

The maximum number of columns per base table is 1024.

The maximum number of columns per index is 16.

The maximum number of columns per SELECT statement is 4096.

The maximum number of foreign key table references per table is 253.

The maximum number of parameters per stored procedure is 1024.

The maximum number of characters allowed for a table name is 128.

The maximum number of characters allowed for a column name 128.

Difference Between Clustered and Non-Clustered Index Data Structures

Part I: Non-Clustered Index

Creating a Table
To better explain SQL Server non-clustered indexes; let’s start by creating a new table and populating it with some sample data using the following scripts. I assume you have a database you can use for this. If not, you will want to create one for these examples.

Create Table DummyTable1
(
EmpId Int,
EmpName Varchar(8000)
)

When you first create a new table, there is no index created by default. In technical terms, a table without an index is called a “heap”. We can confirm the fact that this new table doesn’t have an index by taking a look at the sysindexes system table, which contains one for this table with an of indid = 0. The sysindexes table, which exists in every database, tracks table and index information. “Indid” refers to Index ID, and is used to identify indexes. An indid of 0 means that a table does not have an index, and is stored by SQL Server as a heap.

Now let’s add a few records in this table using this script:

Insert Into DummyTable1 Values (4, Replicate ('d',2000))
GO

Insert Into DummyTable1 Values (6, Replicate ('f',2000))
GO

Insert Into DummyTable1 Values (1, Replicate ('a',2000))
GO

Insert Into DummyTable1 Values (3, Replicate ('c',2000))
GO

Now, let’s view the contests of the table by executing the following command in Query Analyzer for our new table.

Select EmpID From DummyTable1
GO

Empid

4

6

1

3


As you would expect, the data we inserted earlier has been displayed. Note that the order of the results is in the same order that I inserted them in, which is in no order at all.

Now, let’s execute the following commands to display the actual page information for the table we created and is now stored in SQL Server.

dbcc ind(dbid, tabid, -1) – This is an undocumented command.

DBCC TRACEON (3604)
GO

Declare @DBID Int, @TableID Int
Select @DBID = db_id(), @TableID = object_id('DummyTable1')

DBCC ind(@DBID, @TableID, -1)
GO

This script will display many columns, but we are only interested in three of them, as shown below.

PagePID
IndexID
PageType

26408
0
10

26255
0
1

26409
0
1


Here’s what the information displayed means:

PagePID is the physical page numbers used to store the table. In this case, three pages are currently used to store the data.

IndexID is the type of index,

Where:

0 – Datapage

1 – Clustered Index

2 – Greater and equal to 2 is an Index page (Non-Clustered Index and ordinary index),

PageType tells you what kind of data is stored in each database,

Where:

10 – IAM (Index Allocation MAP)

1 – Datapage

2 – Index page

Now, let us execute DBCC PAGE command. This is an undocumented command.

DBCC page(dbid, fileno, pageno, option)

Where:

dbid = database id.

Fileno = fileno of the page. Usually it will be 1, unless we use more than one file for a database.

Pageno = we can take the output of the dbcc ind page no.

Option = it can be 0, 1, 2, 3. I use 3 to get a display of the data. You can try yourself for the other options.

Run this script to execute the command:

DBCC TRACEON (3604)
GO

DBCC page(@DBID, 1, 26408, 3)
GO

The output will be page allocation details.

DBCC TRACEON (3604)
GO

dbcc page(@DBID, 1, 26255, 3)
GO

For More Inoframtion View this web page
http://www.sql-server-performance.com/articles/per/index_data_structures_p1.aspx

Tuesday, March 25, 2008

Asp Interview Questions & Answers

What is ASP.NET?
ASP.NET is a technology for creating dynamic Web applications. It is part of the .NET Framework; you can write ASP.NET applications in most .NET compatible languages, including Visual Basic, C#, J# and JScript. ASP.NET pages (Web Forms) are compiled, providing better performance than with scripting languages.

Web Forms allow you to build powerful forms-based Web pages. When building these pages, you can use ASP.NET server controls to create common UI elements, and program them for common tasks. These controls allow you to rapidly build a Web Form out of reusable built-in or custom components, simplifying the code of a page.

ASP.NET provides a programming model, and infrastructure, to make creating scalable, secure and stable applications faster, and easier than with previous Web technologies


What are main parts of ASP.NET?
• A page and controls framework (Web Forms)
• The ASP.NET compiler
• Security infrastructure
• State-management facilities
• Application configuration
• Health monitoring and performance features
• Debugging support
• An XML Web services framework
• Extensible hosting environment and application life cycle management
• An extensible designer environment

Code-Inline model in Asp.Net
In Code-Inline model the code & event handlers for the controls are located in script blocks in the same .aspx file that contains the HTML and controls. Code-Inline model is useful when you want to maintain your code and presentation logic in a single file.

Code-behind model in Asp.Net
ASP.NET also supports another way to factor your code and presentation content, called the code-behind model. When using code-behind, the code for handling events is located in a physically separate file from the page that contains server controls and markup. This clear delineation between code and content is useful when you need to maintain these separately, such as when more than one person is involved in creating the application. It is often common in group projects to have designers working on the UI portions of an application while developers work on the behavior or code. The code-behind model is well-suited to that environment.


What are the ways to manage state in Asp.Net application?
Ways to manage state in Asp.Net are:
• Using Session and Application objects to cache information.
• Using Memory and Disk Cookies to preserve information.
• Using hidden input fields or the URL -embedded information to pass information from one page to another.
• Using the ViewState property of the page to set and retrieve information stored in a StateBag object.
• Using SQL Server to store state information.


Explain the limitation & issues with the Cookies?
Limitation & Issues with Cookies
using cookies gives you excellent state management capabilities, as they are simple to implement, and they help you move resources off the server. Like almost any particular technique, cookies have some limitations.

Some Users Don’t Allow Cookies
some users believe that viruses can be sent in a cookie and will not allow them onto their computers. Although there have never been any documented cases of this happening, and no one could realistically send a virus through a cookie, a lot of users still turn off the ability to accept cookies. When this happens, the user will not be able to use your site if you use cookies for managing state.


Explain the Limitations & Issues with Automatic SQL Server State Management?
• Although using SQL Server to store your session state relieves you of many difficult development issues, youll still need to consider some important limitations:
• Youre limited to SQL Server.
• This technique can only use SQL Server, no other server database. If you do not have a SQL Server installation available, you will be unable to use this solution.
• Performance may suffer.
• Like any of the state management techniques, using SQL Server to manage your applications state can cause your performance degrade a little. Because it takes a little bit of time to make a connection and read and write state information in the database, theres no avoiding a small bit of overhead.


What does the "EnableViewState" property do? Why would I want it on or off?
EnableViewState turns on the automatic state management feature that enables server controls to re-populate their values on a round trip without requiring you to write any code. This feature is not free however, since the state of a control is passed to and from the server in a hidden form field. You should be aware of when ViewState is helping you and when it is not.
For example, if you are binding a control to data on every round, then you do not need the control to maintain its view state, since you will wipe out any re-populated data in any case. ViewState is enabled for all server controls by default. To disable it, set the EnableViewState property of the control to false.


Explain the concept of Web Application.
An introduction to web applications
A web application consists of a set of web pages that are generated in response to user requests. The Internet has many different types of web applications, such as search engines, online stores, auctions, news sites, discussion groups, games, and so on.
Properties of web applications
• Web applications are a type of client/server application. In that type of application, a user at a client computer accesses an application at a server computer. In a web application, the client and server computers are connected via the Internet or via an intranet (a local area network).
• In a web application, the user works with a web browser at the client computer. The web browser provides the user interface for the application. The most popular web browsers are Microsofts Internet Explorer, .Mozilla Firefox
What method do you use to explicitly kill a users session in ASP.NET?
The Session.Abandon method destroys all the objects stored in a Session object and releases their resources. If you do not call the Abandon method explicitly, the server destroys these objects when the session times out.


What is difference between Response.Redirect and Server.Transfer?
Response.Redirect vs Server.Transfer

Server.Transfer or Response.Redirect both are the method of choice for transferring the user from one place in the application to another

Server.Transfer is similar in that it sends the user to another page with a statement such as Server.Transfer("WebForm2.aspx"). However, the statement has a number of distinct advantages and disadvantages.

Firstly, transferring to another page using Server.Transfer conserves server resources. Instead of telling the browser to redirect, it simply changes the "focus" on the Web server and transfers the request. This means you don't get quite as many HTTP requests coming through, which therefore eases the pressure on your Web server and makes your applications run faster.

But watch out: because the "transfer" process can work on only those sites running on the server, you can't use Server.Transfer to send the user to an external site. Only Response.Redirect can do that.

The other side debates that Server.Transfer is not user friendly because the page requested may not be the page that shows in the URL. Response.Redirect is more user-friendly, as the site visitor can bookmark the page that they are redirected to.

Secondly, Server.Transfer maintains the original URL in the browser. This can really help streamline data entry techniques, although it may make for confusion when debugging.

That's not all: The Server.Transfer method also has a second parameter"preserveForm". If you set this to True, using a statement such as Server.Transfer("WebForm2.aspx", True), the existing query string and any form variables will still be available to the page you are transferring to.

For example, if your WebForm1.aspx has a TextBox control called TextBox1 and you transferred to WebForm2.aspx with the preserveForm parameter set to True, you'd be able to retrieve the value of the original page TextBox control by referencing Request.Form("TextBox1").


.NET

- Difference between asp and asp.net
- How do you do exception management
- If you are using components in your application, how can you handle exceptions raised in a component
- Can we throw exception from catch block
- How do you relate an aspx page with its code behind page
- What are the types of assemblies and where can u store them and how
- What is difference between value and reference types
- Is array reference type / value type
- Is string reference type / value type
- What is web.config. How many web.config files can be allowed to use in an application
- What is differnce between machine.config and web.config
- What is shared and private assembly
- What are asynchronous callbacks
- How to write unmanaged code and how to identify whether the code is managed / unmanaged.
- How to authenticate users using web.config
- What is strong name and which tool is used for this
- What is gacutil.exe. Where do we store assemblies
- Should sn.exe be used before gacutil.exe
- What does assemblyinfo.cs file consists of
- What is boxing and unboxing
- Types of authentications in ASP.NET
- difference between Trace and Debug
- Difference between Dataset and DataReader
- What is custom tag in web.config
- How do you define authentication in web.Config
- What is sequence of code in retrieving data from database
- About DTS package
- What provider ADO.net use by default
- Where does web.config info stored? Will this be stored in the registry?
- How do you register the dotnet component or assembly?
- Difference between asp and asp.net
- Whis is stateless asp or asp.net?
- Authentication mechanism in dotnet
- State management in asp.net
- Types of values mode can hold session state in web.config
- About WebService
- What are Http handler
- What is view state and how this can be done and was this there in asp?
- Types of optimization and name a few and how do u do?
- About DataAdapters
- Features of a dataset
- How do you do role based security
- Difference between Response.Expires and Expires.Absolute
- Types of object in asp
- About duration in caching technique
- Types of configuration files and ther differences
- Difference between ADO and ADO.net
- About Postback
- If you are calling three SPs from a window application how do u check for the performance of the SPS

#61607; Database

- What is normalization
- What is an index and types of indexes. How many number of indexes can be used per table
- What is a constraint. Types of constraints
- What are code pages
- What is referential integrity
- What is a trigger
- What are different types of joins
- What is a self join
- Authentication mechanisms in Sql Server
- What are user defined stored procedures.
- What is INSTEAD OF trigger
- Difference between SQL server 7.0 and 2000
- How to optimize a query that retrieves data by joining 4 tables
- Usage of DTS
- How to disable an index using select query
- Is non-clustered index faster than clustered index
- Types of optimization in querries
- Difference between ISQL and OSQL
- How you log an exception directly into sql server what is used for this
- About Replication in Database
- What is the default optimization done in oracle and sql server
- How can i make a coulmn as unique
- How many no of tables can be joined in same sql server
- How many coulmns can exist per table
- About Sql Profiler usage

• HR & Project

- About yourself
- About work experience
- How long you are working on .NET
- Are you willing to relocate
- When will you join
- Why do u what to change from current organization
- Why do you want to join Accenture
- What are your weaknesses / areas of improvement
- What is your current project and your responsibilities
- Have you done database design / development
- What is D in ACID

#61656; Microsoft

• HR (Screening)
- Tell about yourself
- Tell about your work experience
- Tell about projects
- Tell about your current project and your role in it
- What is your current salary p.a.

• Technical

#61607; .NET
- How do you manage session in ASP and ASP.NET
- How do you handle session management in ASP.NET and how do you implement them. How do you handle in case of SQLServer mode.
- What are different authentication types. How do you retreive user id in case of windows authentication
- For a server control, you need to have same properties like color maxlength, size, and allowed character throughout the application. How do you handle this.
- What is custom control. What is the difference between custom control and user control
- What is the syntax for datagrid and specifying columns
- How do you add a javascript function for a link button in a datagrid.
- Does C# supports multi-dimensional arrays
- How to transpose rows into columns and columns into rows in a multi-dimensional array
- What are object oriented concepts
- How do you create multiple inheritance in C#
- ADO and ADO.NET differences
- Features and disadvantages of dataset
- What is the difference between and ActiveX dll and control
- How do you perform validations
- What is reflection and disadvantages of reflection
- What is boxing and how it is done internally
- Types of authentications in IIS
- What are the security issues if we send a query from the application
- Difference between ByVal and ByRef
- Disadvantages of COM components

- How do we invoke queries from the application
- What is the provider and namespaces being used to access oracle database
- How do you load XML document and perform validation of the document
- How do you access elements in XML document
- What is ODP.NET
- Types of session management in ASP.NET
- Difference between datareader and dataset
- What are the steps in connecting to database
- How do you register a .NET assembly
- Usage of web.config
- About remoting and web services. Difference between them
- Caching techniques in .NET
- About CLS and CTS
- Is overloading possible in web services
- Difference between .NET and previous version
- Types of chaching. How to implement caching
- Features in ASP.NET
- How do you do validations. Whether client-side or server-side validations are better
- How do you implement multiple inheritance in .NET
- Difference between multi-level and multiple inheritance
- Difference between dataset and datareader
- What are runtime hosts
- What is an application domain
- What is viewstate
- About CLR, reflection and assemblies
- Difference between .NET components and COM components
- What does assemblyinfo.cs consists
- Types of objects in ASP

#61607; Database

- What are the blocks in stored procedure
- How do you handle exceptions. Give the syntax for it
- What is normalization and types of normalization
- When would you denormalize
- Difference between a query and strored procedure
- What is clustered and non-clustered indexes
- Types of joins
- How do you get all records from 2 tables. Which join do you use
- Types of optimization
- Difference between inline query and stored procedure

#61607; Project related
- Tell about your current project
- Tell about your role
- What is the toughest situation you faced in the development
- How often you communicate with the client
- For what purposes, you communicate with the client
- What is the process followed
- Explain complete process followed for the development
- What is the life cycle model used for the development
- How do communicate with team members
- How do you say you are having excellent team management skills
- If your client gives a change and asks for early delivery. How will you manage.
- How will gather requirements and where do you record. Is it in word / Excel or do you have any tool for that
- What is the stage when code is delivered to the client and he is testing it.
- What are the different phases of SDLC
- How do you handle change requests
- How do you perform impact analysis
- How do you write unit test cases.
- About current project architecture

#61656; Keane on 12th October 2003

• Technical

#61607; .NET
- Write steps of retrieving data using ado.net
- Call a stored procedure from ado.net and pass parameter to it
- Different type of validation controls in asp.net
- Difference between server.Execute and response.redirect
- What is Response.Flush method
- How Response.flush works in server.Execute
- What is the need of clinet side and server side validation
- Tell About Global.asax
- What is application variable and when it is initialized
- Tell About Web.config
- Can we write one page in c# and other in vb in one application
- When web.config is called
- How many web.config a application can have
- How do you set language in web.cofig


#61607; Database
- How do you rate yourrself in oracle and sql server
- What is E-R diagram
- Draw E-R diagram for many to many relationship
- Design databaseraw er diagram for a certain scenario(many author many books)
- Diff between primary key and unique key
- What is Normalization
- Difference between sub query and nested query
- Indexes in oracle
- Querry to retrieve record for a many to many relationship
- Querry to get max and second max in oracle in one querry
- Write a simple Store procedure and pass parameter to it

#61656; Digital Globalsoft

• Technical

#61607; .NET
- Difference between VB dll and assemblies in .NET
- What is machine.config and web.config
- Tell about WSDL
- About web methods and its various attributes
- What is manifest
- Types of caching
- What does connection string consists of
- Where do you store connection string
- What is the difference between session state and session variables
- How do you pass session values from one page to another
- What are WSDL ports
- What is dataset and tell about its features. What are equivalent methods of previous, next etc. Of ADO in ADO.NET
- What is abstract class
- What is difference between interface inheritance and class inheritance
- What are the collection classes
- Which namespace is used for encryption
- What are the various authentication mechanisms in ASP.NET
- What is the difference between authentication and autherization
- What are the types of threading models
- How do you send an XML document from client to server
- How do you create dlls in .NET
- What is inetermediate language in .NET
- What is CLR and how it generates native code
- Can we store PROGID informatoin in database and dynamically load the component
- Is VB.NET object oriented? What are the inheritances does VB.NET support.
- What is strong name and what is the need of it
- Any disadvantages in Dataset and in reflection
- Advantage of vb.net over vb
- What is runtime host
- How to send a DataReader as a parameter to a remote client
- How do you consume a webservice
- What happens when a reference to webservice is added
- How do you reference to a private & shared assembly
- What is the purpose of System.EnterpriseServices namespace
- About .Net remoting
- Difference between remoting and webservice
- Types of statemanagement techniques
- How to register a shared assembly
- About stateless and statefull webservice
- How to invoke .net components from com components,give the sequence
- How to check null values in dataset
- About how soap messages are sent and received in webservice
- Error handling and how this is done
- Features in .net framework 1.1
- Any problem found in vs.et
- Optimization technique description
- About disco and uddi
- What providers does ado.net uses internally
- Oops concepts
- Disadvantages of vb
- XML serialization
- What providers do you use to connect to oracle database?

#61607; Database
- Types of joins

#61607; General
- What are various life cycle model in S/W development

#61656; Infosys

• Technical

#61607; .NET
- How do you rate yourself in .NET
- What is caching and types of caching
- What does VS.NET contains
- What is JIT, what are types of JITS and their pupose
- What is SOAP, UDDI and WSDL
- What is dataset

#61607; Database
- How do you optimize SQL queries

#61607; General
- Tell about yourself and job
- Tell about current project
- What are sequence diagrams, collaboration diagrams and difference between them
- What is your role in the current project and what kinds of responsibilites you are handling
- What is the team size and how do you ensure quality of code
- What is the S/W model used in the project. What are the optimization techniques used. Give examples.
- What are the SDLC phases you have invloved

#61656; Satyam

• Technical

#61607; .NET
- Types of threading models in VB.net
- Types of compatability in VB and their usage
- Difference between CDATA and PCDATA in XML
- What is Assync in XML api which version of XML parser u worked with
- Types of ASP objects
- Difference between application and session
- What is web application virtual directory
- Can two web application share a session and application variable
- If i have a page where i create an instance of a dll and without invoking any method can I send values to next page
- Diffeernce between Active Exe and /Dll
- Can the dictionary object be created in client’s ccope?
- About MTS and it’s purpose
- About writting a query and SP which is better
- I have a component with 3 parameter and deployed to client side now i changed my dll method which takes 4 parameter.How can i deploy this without affecting the clent’s code
- How do you do multithreading application in VB
- About Global .asax
- Connection pooling in MTS
- If cookies is disabled in clinet browser will session work
- About XLST
- How do you attach an XSL to an XML in presenting output
- What is XML
- How do you make your site SSL enabled
- Did you work on IIS adminisdtration
-
#61607; Database
- dd
#61607; General
- dd
• HR
- About educational background
- About work experience
- About area of work
- Current salary, why are looking for a change and about notice period
- About company strength, verticals, clients, domains etc.
- Rate yourself in different areas of .NET and SQL

#61656; Cognizent

• Technical

#61607; .NET
- About response.buffer and repsonse.flush
- About dataset and data mining
- About SOAP
- Usage of htmlencode and urlencode
- Usage of server variables
- How to find the client browser type
- How do you trap errors in ASP and how do you invoke a component in ASP
#61607; Database
- About types of indexes in SQL server
- Difference between writing SQL query and stored procedure
- About DTS usage
- How do you optimize Sql queries

#61607; General
- Dfs
- Rate yourself in .NET and SQL
- About 5 processes
- About current project and your role
• HR
- About educational background, work experience, and area of work
-


#61656; TCS

• Technical

#61607; .NET
- Define .NET architecture
- Where does ADO.NET and XML web services come in the architecture
- What is MSIL code
- Types of JIT and what is econo-JIT
- What is CTS, CLS and CLR
- Uses of CLR
- Difference between ASP and ASP.NET
- What are webservices, its attributes. Where they are available
- What is UDDI and how to register a web service
- Without UDDI, is it possible to access a remote web service
- How a web service is exposed to outside world
- What is boxing and unboxing
- What is WSDL and disco file
- What is web.config and machine.config
- What is difference between ASP and ASP.NET
- What is dataset and uses of dataset
- What does ADO.NET consists of?
- What are various authentication mechanisms in ASP.NET
- What do you mean by passport authentication and windows authentication
- What is an assembly and what does manifest consists
- What is strong name and what is the purpose of strong name
- What are various types of assemblies
- Difference between VB.NET and C#. Which is faster
- Types of caching
- How WSDL is stored
- What is the key feature of ADO.NET compared to ADO
- How does dataset acts in a disconnected fashion
- Does the following statement executes successfully:
Response.Write(“value of i = ” + i);
- What is ODP.NET
- What are the providers available with VS.NET
- What is a process
- What is binding in web service
- How a proxy is generated for a web service
- About delegates
- What are static assemblies and dynamic assemlies. Differences between them

#61607; Database
- What are the types of triggers
- Types of locks in database
- Types of indexes. What is the default key created when a primary key is created in a table
- What is clustered, non-clustured and unique index. How many indexes can be created on a table
- Can we create non-clustured index on a clustered index
- Types of backups
- What is INSTEAD OF trigger
- What is difference between triggers and stored procedures. And advantages of SP over triggers
- What is DTS and purpose of DTS
- Write a query to get 2nd maximum salary in an employee table
- Types of joins.
- What is currency type in database
- What are nested triggers
- What is a heap related to database

#61607; General

• HR
- About yourdelf
- About procsses followed
- Notice period
- Appraisal process
- What is SOAP and why it is required
- About effort estimation
- Whether salary negotiable
- Why are looking for a change
- How fo you appraise a person
- Do you think CMM process takes time
- About peer reviews
- How do you communicate with TL / PM / Onsite team

#61656; DELL

• Technical

#61607; .NET
- Any disadvantages in Dataset and in reflection
- Difference between Active Exe and Activex dll
- Can we make activex dll also ti execute in some process as that of client ? How can we do?
- Types of compatabilities and explain them
- Types of instancing properties and explain each. Tell the difference between multiuse,singleuse and globalmultiuse and which is default
- What is assembly?
- Difference between COM and .NET component
- What is early binding and Late binding. Difference which is better
- What happens when we instantiate a COM component
- What happens when we instantiate a .NET component
- Are you aware of containment and Aggregation
- What is UUID and GUID what is the size of this ID?
- About Iunknown interface Queue ,its methods Querry Interface Addref,Release and Explane each
- What ‘ll u do in early and late binding
- In early binding will the method invoked on com component will verify it’s existance in the system or not?
- Difference between dynamic query and static query
- About performance issues on retrieving records
- About ADO and its objects
- What is unmannaged code and will CLR handle this kind of code or not .
- Garbage collector’s functionality on unmanaged code
- If Instancing = Single use for ActiveX Exe, how will this be executed if there are 2 consecutive client requests ?
- Threading Types.
- How about the security in Activex DLL and Activex EXE

#61607; Database
- Types of cursors and explanation each of them
- Types of cursor locations and explanation on each of them
- Types of cursor locks and explanation each of them
- How do you retrieve set of records from database server.{Set max records = 100 & use paging where pager page no or records = 10 & after displaying 100 records again connect to database retrieve next 100 }

• HR & Project

- Rate yourself in vb and com
- Whether I have any specific technology in mind to work on.


#61656; MMTTS

• Technical

#61607; .NET
- About .NET Framework
- About Assembly in .NET, types of assemblies, their difference, How to register into GAC. How to generate the strong names & its use.
- What is side by side Execution?
- What is serialization?
- Life cycle of ASP.NET page when a request is made.
- If there is submit button in a from tell us the sequence what happens if submit is clicked and in form action is specified as some other page.
- About a class access specifiers and method access specifiers.
- What is overloading and how can this be done.
- How to you declare connection strings and how to you make use of web.config.
- How many web.copnfig can exists in a web application & which will be used.
- About .NET Remoting and types of remoting
- About Virtual functions and their use.
- How do you implement Inheritance in dot net
- About ado.net components/objects. Usage of data adapters and tell the steps to retrieve data.
- What does CLR do as soon as an assembly is created
- How do you retrieve information from web.config.
- How do you declare delegates and are delegates and events one and the same and explain how do you declare delegates and invoke them.
- If I want to override a method 1 of class A and in class b then how do you declare?
- What does CLR do after the IL is generated and machine language is generated .Will it look for main method
- About friend and Protected friend
- About multi level and multiple inheritance how to achieve in .net
- Sequence to connect and retrieve data from database useig dataset
- About sn.exe
- What was the problem in traditional component why side by side execution is supported in .net
- How .net assemblies are registred as private and shared assembly
- All kind of access specifiers for a class and for methods
- On ODP.net
- Types of assemblies that can be created in dotnet
- About namespaces
- OOPs concept
- More on CLR

• HR & Project
- About yourself
- About the current employer
- About expertise
- What type of job you are expecting
- What is current and expected is it negotiable
- Can you justify why r you expecting more in professional terms
- What are you looking for in Dell





What is CLR (Common Language Runtime)?

CLR provides a environment in which program are executed, it activate object, perform security check on them, lay them out in the memory, execute them and garbage collect them.
The common Language Runtime (CLR) a rich set of features for cross-language development and deployment. CLR supports both Object Oriented Languages as well as procedural languages. CLR provides security, garbage collection, cross language exception handling, cross language inheritance and so on.




The .NET Framework provides a runtime environment called the Common Language Runtime or CLR (similar to the Java Virtual Machine or JVM in Java), which handles the execution of code and provides useful services for the implementation of the program. CLR takes care of code management at program execution and provides various beneficial services such as memory management, thread management, security management, code verification, compilation, and other system services. The managed code that targets CLR benefits from useful features such as cross-language integration, cross-language exception handling, versioning, enhanced security, deployment support, and debugging.







What is CTS (Common Type System) ?

The common type system defines how types are declared, used, and managed in the runtime, and is also an important part of the runtime's support for cross-language integration. The common type system performs the following functions:
• Establishes a framework that helps enable cross-language integration, type safety, and high performance code execution.
• Provides an object-oriented model that supports the complete implementation of many programming languages.
• Defines rules that languages must follow, which helps ensure that objects written in different languages can interact with each other.
Difference between Classic ASP and ASP.Net?

Posted by Admin | Posted on Thu, 06 Sep 2007

• ASP is Interpreted language based on scripting languages like Jscript or VBScript.
• ASP has Mixed HTML and coding logic.
• Limited development and debugging tools available.
• Limited OOPS support.
• Limited session and application state management.
• Poor Error handling system.
• No in-built support for XML.
• No fully distributed data source support.
while
• ASP.Net is supported by compiler and has compiled language support.
• Separate code and design logic possible.
• Variety of compilers and tools available including the Visual studio.Net.
• Completely Object Oriented.
• Complete session and application state management.
• Full proof error handling possible.
• Full XML Support for easy data exchange.
• Fully distributed data source support.

What are the different types of Assemblies?

Posted by Admin | Posted on Thu, 06 Sep 2007

Different types of assemblies are Priave, Public/Shared, Static, Dynamic assembly.
Private Assemblies : Assembly used within an application is known as private assemblies
Public/shared Assemblies : Assembly which can be shared across applicaiton is known as shared assemblies. Strong Name has to be created to create a shared assembly. This can be done using SN.EXE. The same has to be registered using GACUtil.exe (Global Assembly Cache).
Satellite Assemblies : These assemblies contain resource files pertaining to a locale (Culture+Language). These assemblies are used in deploying an Gloabl applicaiton for different languages.
Static assemblies can include .NET Framework types (interfaces and classes), as well as resources for the assembly (bitmaps, JPEG files, resource files, and so on). Static assemblies are stored on disk in portable executable (PE) files.
Dynamic Assemblies : You can also use the .NET Framework to create dynamic assemblies, which are run directly from memory and are not saved to disk before execution. You can save dynamic assemblies to disk after they have executed.

What is Authentication and Authorization?
Authentication is the process of identifying users. Authentication is identifying/validating the user against the credentials (username and password) and Authorization performs after authentication. Authorization is the process of granting access to those users based on identity. Authorization allowing access of specific resource to user.
What is Side-by-Side Execution ?
The CLR allows any versions of the same-shared DLL (shared assembly) to execute at the same time, on the same system, and even in the same process. This concept is known as side-by-side execution.
What are the different types of Caching?
There are three types of Caching: Output,Fragment,Data Caching
• Output Caching: stores the responses from an asp.net page.
• Fragment Caching: Only caches/stores the portion of page (User Control)
• Data Caching: is Programmatic way to Cache objects for performance.

Describe the role of inetinfo.exe, aspnet_isapi.dll and aspnet_wp.exe in the page loading process.
When a request comes into Microsoft's IIS Web server (inetinfo.exe, is ur webserver running) its extension is examined and, based on this extension, the request is either handled directly by IIS or routed to an ISAPI extension. An ISAPI extension is a compiled class that is installed on the Web server and whose responsibility it is to return the markup for the requested file type.
By default, IIS handles the request, and simply returns the contents of the file requested. This makes sense for static files, like images, HTML pages, CSS files, external JavaScript files, and so on. For example, when a request is made for a .html file, IIS simply returns the contents of the requested HTML file.

IIS and ASP.NET communication
For files whose content is dynamically generated, the ISAPI extension configured for the file extension is responsible for generating the content for the requested file. For example, a Web site that serves up classic ASP pages has the .asp extension mapped to the asp.dll ISAPI extension. The asp.dll ISAPI extension executes the requested ASP page and returns its generated HTML markup. If your Web site serves up ASP.NET Web pages, IIS has mapped the .aspx to aspnet_isapi.dll, an ISAPI extension that starts off the process of generating the rendered HTML for the requested ASP.NET Web page.
The aspnet_isapi.dll ISAPI extension is a piece of unmanaged code. That is, it is not code that runs in the .NET Framework. When IIS routes the request to the aspnet_isapi.dll ISAPI extension, the ISAPI extension routes the request onto the ASP.NET engine(aspnet_wp.exe), which is written in managed code - managed code is code that runs in the .NET Framework.
inetinfo.exe is the Microsoft IIS server running which handles the ASP.NET requests among other things.When an ASP.NET request is received,the ISAPI filter aspnet_isapi.dll takes care of it by passing the request to the actual worker process aspnet_wp.exe
What is the difference between User Control and Custom Control?

Custom Controls are compiled code (Dlls), easier to use, difficult to create, and can be placed in toolbox. Drag and Drop controls. Attributes can be set visually at design time. Can be used by Multiple Applications (If Shared Dlls), Even if Private can copy to bin directory of web application add reference and use. Normally designed to provide common functionality independent of consuming Application. User Controls are similar to those of ASP include files, easy to create, can not be placed in the toolbox and dragged - dropped from it. A User Control is shared among the single application files.
Factors User control Custom control

Deployment Designed for single-application scenarios Designed so that it can be used by more than one application
Deployed in the source form (.ascx) along with the source code of the application Deployed either in the application's Bin directory or in the global assembly cache
If the same control needs to be used in more than one application, it introduces redundancy and maintenance problems Distributed easily and without problems associated with redundancy and maintenance
Creation Creation is similar to the way Web Forms pages are created; well-suited for rapid application development (RAD) Writing involves lots of code because there is no designer support
Content A much better choice when you need static content within a fixed layout, for example, when you make headers and footers More suited for when an application requires dynamic content to be displayed; can be reused across an application, for example, for a data bound table control with dynamic rows
Design Writing doesn't require much application designing because they are authored at design time and mostly contain static data Writing from scratch requires a good understanding of the control's life cycle and the order in which events execute, which is normally taken care of in user controls














.NET Abbreviations:
1. CLR = Common Language Runtime
2. CLS = Common Language Specifications
3. CTS = Common Type Specifications
4. GC = Garbage Collector.
5. WSDL = Web Services Description Language.
6. MSIL = Microsoft Intermediate Language.
7. CIL = Common Intermediate Language - MSIL.
8. JIT = Just In Time.
9. PE = Portable Executable – A file format.
10. COFF = Common Object File Format – A file format.
11. GAC = Global Assembly Cache.
12. DDL = Data Definition Language.
13. DML = Data Manipulation Language.
14. CAS = Code Access Security.
15. RCW = Runtime Callable Wrapper.
16. COM = Component Object Model.
17. CCW = COM Callable Wrapper.
18. DOM = Document Object Model.
19. DNA = Distributed interNet Applications Architecture.
20. GUID = Globally Unique Identifier.
21. MS-DTC = Microsoft Distributed Transaction Coordinator.
22. OLTP = Online Transaction Processing.
23. OLAP = Online Analytical Processing.
24. RAD = Rapid Application Development.
25. SMTP = Simple Mail Transfer Protocol.
26. SOAP = Simple Object Access Protocol.
27. TCP = Transport Control Protocol.
28. TLB = Type Library.
29. UDF = Uniform Data Format.
30. UDDI = Universal Description, Discovery and Integration.



What is the difference between a namespace and an assembly name?
Namespaces are logical, whereas assemblies are physical.
Namespace is a Collection of names wherein each name is Unique. They form the logical boundary for a Group of classes.Namespace must be specified in Project-Properties.
A namespace is a logical naming scheme to group related types. Namespaces can contain other namespaces to form a hierarchy. The "fully qualified name" of a type is its namespace followed by its type name, separated by a period (for example, System.Windows.Forms.Button). Type names must be unique within a namespace, but the same type name can be used in different namespaces.
An assembly is a physical deployment scheme to group related types. An assembly can contain one or many namespaces. A namespace can exist in one or many assemblies. Assemblies is an Output Unit. It is a unit of Deployment & a unit of versioning. Assemblies contain MSIL code. Assemblies are Self-Describing. [e.g. metadata,manifest]. An assembly is the primary building block of a .NET Framework application. It is a collection of functionality that is built, versioned, and deployed as a single implementation unit (as one or more files). All managed types and resources are marked either as accessible only within their implementation unit, or by code outside that unit.
What are the advantages of an assembly?

Increased performance. Better code management and encapsulation. It also introduces the n-tier concepts and business logic.











What is the purpose of an Assembly?
An assembly controls many aspects of an application. The assembly handles versioning, type and class scope, security permissions, as well as other metadata including references to other assemblies and resources. The rules described in an assembly are enforced at runtime.


How to Manage State in ASP.Net?
1. ViewState
2. QueryString
3. Cookies
4. Session
5. Application
What is the Web User Control?

Combines existing Server and HTML controls by using VS.Net. to create functional units that encapsulate some aspects of UI. Resides in Content Files, which must be included in project in which the controls are used.

What is the Composite Custom Control?
combination of existing HTML and Server Controls.


Which tool is used to deploy an assembly, so as the assembly is available to all the application?

The GacUtil.exe is the tool, which allows us to add any assembly to the windows GAC.




How many catch statements can be associated with single try statement?

There can be a zero or more catch statement for each try statement. So it has not limit to the number of catch statement per try statement.




What does a keyword using works for?

Using is just a convention or a short-cut method which allows us to access the classes in a namespace by referencing it once. So when ever we want use the classes or methods in them, we can avoid typing the entire namespace hierarchy. However it is not a good practice when there are likely chances to have name ambiguity or collision of class names.


What are the different types of Session state management options available with ASP.NET?

ASP.NET provides In-Process & Out-of-Process state management, Also known as "In-Proc" and "Out-Proc". In-Proc stores the session in memory of the web server, that is on the same server the ASP.Net page is.On the other hand Out-Proc session state management stores the session data on external data source, which can be a SQL Server or Server State Service. Out-of-Process state management requires the objects stored in session, must be serializable.


What is Remoting? Give Example.
Remoting is a means by which one operating system process, or program, can communicate with another process. The two processes can exist on the same computer or on two computers connected by a LAN or the Internet. Web services are probably the best known type of remoting, but they are not the only option.

What is Marshalling?
Marshaling is a process of making an object in one process (the server) available to another process (the client). There are two ways to achieve the marshalling.
i. Marshal by value: the server creates a copy of the object passes the copy to the client. When a client makes a call to an object marshaled by value (MBV), the server creates an exact copy and sends that copy to the client. The client can then use the object's data and executable functionality directly within its own process or application domain without making additional calls to the server. Objects that the application accesses frequently are best remoted using MBV.
ii. Marshal by reference: the client creates a proxy for the object and then uses the proxy to access the object. When a client makes a call to an object marshaled by reference (MBR), the .NET framework creates a proxy in the client's application domain and the client uses that proxy to access the original object on the server. Large objects that the application accesses relatively infrequently are good candidates for MBR.
What is serialization?

Serialization is the process of converting an object into a stream of bytes. De-serialization is the opposite process of creating an object from a stream of bytes. Serialization/De-serialization is mostly used to transport objects (e.g. during remoting), or to persist objects (e.g. to a file or database). There are two separate mechanisms provided by the .NET class library for serialization - XmlSerializer and SoapFormatter and BinaryFormatter. Microsoft uses XmlSerializer for Web Services, and uses SoapFormatter/BinaryFormatter for remoting.



Which method do you use to redirect to user to another page without performing a round trip to Client?

Server.Transfer(“Page2.aspx”);


What is a Page Life Cycle of an ASP.Net page?
There are various stages described as under.
• Init
• LoadViewState
• LoadPostBackData
• Load
• RaisePostBackDataChangedEvent
• RaisePostBackEvents
• Pre-Render
• SaveViewState
• Render
• Unload

What is a life span of a static variable?

A static variable’s life span is till the class is in memory.


Do I have any control over the garbage collection algorithm?

Yes, we have a limited control over the GC algorithm, For example, the System.GC class exposes a Collect method - this forces the garbage collector to collect all unreferenced objects immediately.

What is the difference bettween DataReader and DataSet?

DataReader represents only one database record at a time. You must call the Read() method to fetch each new record from the underlying database table into memory. Each time you call Read() again, the previously fetched record is lost. DataSet is on the other hand, enables you to represent the results of a database query in your server's memory. Because a DataSet provides you with a memory-resident representation of data, you can work with the results of a database query as a whole. DataReader must remain connected to a database table. A DataReader is tied down to its underlying data source. The DataSet object is central to supporting disconnected, and distributed data scenarios with ADO.NET. The DataSet is a memory-resident representation of data that provides a consistent relational programming model regardless of the data source. It might be helpful to think of a DataReader as a forward-only recordset. A DataSet, on the other hand, is similar to a disconnected, client-side, static recordset. DataSets also require more overhead to create and populate than DataReaders.


What data type does the RangeValidator control support?

Integer, Date and String.


Difference between managed and unmanaged code?
Managed Code :Code that is executed by the CLR is Managed code, provides information (i.e., metadata) to allow the CLR to locate methods encoded in assembly modules, store and retrieve security information, handle exceptions, and walk the program stack. Managed code can access both managed data and unmanaged data. Managed data—Memory that is allocated and released by the CLR using Garbage Collection. Managed data can only be accessed by managed code
Managed code is code that is written to target the services of the common language runtime. In order to target these services, the code must provide a minimum level of information (metadata) to the runtime. All C#, Visual Basic .NET, and JScript .NET code is managed by default. Visual Studio .NET C++ code is not managed by default, but the compiler can produce managed code by specifying a command-line switch (/CLR).
Unmanaged Code :Code that is directly executed by the Operating System, not by CLR is known as un-managed code. Typically applications written in VB 6.0, C++, C, etc are all examples of unmanaged code. Unmanaged code typically targets the processor architecture and is always dependent on the computer architecture. Unmanaged code is always compiled to target a specific architecture and will only run on the intended platform. This means that if you want to run the same code on different architecture then you will have to recompile the code using that particular architecture. Unmanaged code is always compiled to the native code which is architecture specific. When we compile unmanaged code it gets compiled into a binary X86 image. And this image always depends on the platform on which the code was compiled and cannot be executed on the other platforms that are different that the one on which the code was compiled. Unmanaged code does not get any services from the managed execution environment.
In unmanaged code the memory allocation, type safety, security, etc needs to be taken care of by the developer. This makes unmanaged code prone to memory leaks like buffer overruns and pointer overrides and so forth.



What is an assembly manifest?
An assembly manifest is metadata inside an assembly that describes everything there is to know about the assembly and its contents. The assembly manifest contains this assembly metadata. The assembly manifest can be stored in either a PE file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a standalone PE file that contains only assembly manifest information. An assembly manifest contains all the metadata needed to specify the assembly's version requirements and security identity, and all metadata needed to define the scope of the assembly and resolve references to resources and classes. The manifest contains:
Strong Name - The assembly's name, version, culture, optional processor architecture, and public key (for shared assemblies)
File Contents - Name and hash of all files in the assembly
Type List - Types defined in the assembly, including public types that are exported from the assembly
Resource List - Icons, images, text strings and other resources contained in the assembly
Dependencies - Compile-time dependencies on other assemblies
Security - Permissions required for the assembly to run properly
What is reflection?

All .NET compilers produce metadata about the types defined in the modules they produce. This metadata is packaged along with the module (modules in turn are packaged together in assemblies), and can be accessed by a mechanism called reflection. The System.Reflection namespace contains classes that can be used to interrogate the types for a module/assembly. Reflection is ability to find information about types contained in an assembly at run time.









What is an Metadata?

Metadata is the complete way of describing what is in a .NET assembly. Digging into the metadata yields the types available in that assembly, viz. classes, interfaces, enums, structs, etc., and their containing namespaces, the name of each type, its visibility/scope, its base class, the interfaces it implemented, its methods and their scope, and each method’s parameters, type’s properties, and so on. The assembly metada is generated by the high-level compilers automatically from the source files. The compiler embeds the metadata in the target output file, a dll, an .exe or a .netmodule in the case of multi-module assembly. In the case of a multimodule assembly ever module that contains IL must have the metadata embeded in it to describe the types in that module. Every compiler targeted for the .NET CLR is required to generate and embed the metadata in the output file, and that metadata must be in a standard format. .NET Reflection extensively uses the metadata information to know the type information dynamically.



What is the lifespan for items stored in ViewState?

Items stored in a ViewState exist for the life of the current page, including the post backs on the same page.

What is the lifespan for items stored in ViewState?

Items stored in a ViewState exist for the life of the current page, including the post backs on the same page.

Can we disable ViewState, If, yes how?

ViewState can be disabled by using "EnableViewState" property set to false.


Which method do you invoke on the DataAdapter control to load your generated dataset with data?

DataAdapter’s fill () method is used to fill load the data in dataset.


What are the most important property and most important method of a Repeater control?
The DataSource property and DataBind() method.

What method do you use to explicitly kill a user’s Session?

HttpContext.Current.Session.Abandon()


What are the layouts of ASP.NET Pages?

GridLayout and FlowLayout. GridLayout positions the form object on absolute x and y co-ordinates of the screen. FlowLayout positions the form objects relative to each other.

What is Object Pooling?

A pool is technical term that refers to a group of resources, such as connections, threads, and objects. Putting a few objects into a pool allows hundreds of clients to share these few objects (you can make the same assertion for threads, connections, and other objects). Pooling is therefore a technique that minimizes the use of system resources, improves performance, and helps system scalability.


What is the difference between repeater over datalist and datagrid?
• The Repeater class is not derived from the WebControl class, like the DataGrid and DataList. Therefore, the Repeater lacks the stylistic properties common to both the DataGrid and DataList. What this boils down to is that if you want to format the data displayed in the Repeater, you must do so in the HTML markup.
• The Repeater control provides the maximum amount of flexibility over the HTML produced. Whereas the DataGrid wraps the DataSource contents in an HTML < table >, and the DataList wraps the contents in either an HTML < table > or < span > tags (depending on the DataList's RepeatLayout property), the Repeater adds absolutely no HTML content other than what you explicitly specify in the templates.
• While using Repeater control, If we wanted to display the employee names in a bold font we'd have to alter the "ItemTemplate" to include an HTML bold tag, Whereas with the DataGrid or DataList, we could have made the text appear in a bold font by setting the control's ItemStyle-Font-Bold property to True.
• The Repeater's lack of stylistic properties can drastically add to the development time metric. For example, imagine that you decide to use the Repeater to display data that needs to be bold, centered, and displayed in a particular font-face with a particular background color. While all this can be specified using a few HTML tags, these tags will quickly clutter the Repeater's templates. Such clutter makes it much harder to change the look at a later date. Along with its increased development time, the Repeater also lacks any built-in functionality to assist in supporting paging, editing, or editing of data. Due to this lack of feature-support, the Repeater scores poorly on the usability scale.
• However, The Repeater's performance is slightly better than that of the DataList's, and is more noticeably better than that of the DataGrid's. Following figure shows the number of requests per second the Repeater could handle versus the DataGrid and DataList

What is DLL-HELL?

Situations where we have to put same name Dlls in single directory where are Dlls are of different versions.

How to read the comma seperated values from a string?
C#
stringstr = "a,b,c,d,e,f";
string delimstr = ",";
char[] delimiter = delimStr.ToCharArray();
foreach (string s in str.Split(delimiter))
{
Response.Write (s.ToString ()+ "
");
}


What is Web Gardening? How would using it affect a design?

The Web Garden Model
The Web garden model is configurable through the section of the machine.config file. Notice that the section is the only configuration section that cannot be placed in an application-specific web.config file. This means that the Web garden mode applies to all applications running on the machine. However, by using the node in the machine.config source, you can adapt machine-wide settings on a per-application basis.
Two attributes in the section affect the Web garden model. They are webGarden and cpuMask. The webGarden attribute takes a Boolean value that indicates whether or not multiple worker processes (one per each affinitized CPU) have to be used. The attribute is set to false by default. The cpuMask attribute stores a DWORD value whose binary representation provides a bit mask for the CPUs that are eligible to run the ASP.NET worker process. The default value is -1 (0xFFFFFF), which means that all available CPUs can be used. The contents of the cpuMask attribute is ignored when the webGarden attribute is false. The cpuMask attribute also sets an upper bound to the number of copies of aspnet_wp.exe that are running.
Web gardening enables multiple worker processes to run at the same time. However, you should note that all processes will have their own copy of application state, in-process session state, ASP.NET cache, static data, and all that is needed to run applications. When the Web garden mode is enabled, the ASP.NET ISAPI launches as many worker processes as there are CPUs, each a full clone of the next (and each affinitized with the corresponding CPU). To balance the workload, incoming requests are partitioned among running processes in a round-robin manner. Worker processes get recycled as in the single processor case. Note that ASP.NET inherits any CPU usage restriction from the operating system and doesn't include any custom semantics for doing this.
All in all, the Web garden model is not necessarily a big win for all applications. The more stateful applications are, the more they risk to pay in terms of real performance. Working data is stored in blocks of shared memory so that any changes entered by a process are immediately visible to others. However, for the time it takes to service a request, working data is copied in the context of the process. Each worker process, therefore, will handle its own copy of working data, and the more stateful the application, the higher the cost in performance. In this context, careful and savvy application benchmarking is an absolute must.
Changes made to the section of the configuration file are effective only after IIS is restarted. In IIS 6, Web gardening parameters are stored in the IIS metabase; the webGarden and cpuMask attributes are ignored.

What is HttpContext Object? Where is it accessible?

It's is an Object that Encapsulates all HTTP-specific information about an individual HTTP request. It is avaliable through out the Asp.net request pipline.


How to Convert a string from Capital Letter to Small Letter ?

String str = System.Globalization.CultureInfo.CurrentUICulture.TextInfo.ToTitleCase("SOMEText").ToLower();

OutPut: sometext

How to convert a string from upper case to lower case using ASP.NET?
using System.Globalization;
string userName = "ABCDEF";
userName = CultureInfo.CurrentUICulture.TextInfo.ToTitleCase(userName).ToLower();
Ouput: userName = abcdef
What is difference between ExecuteReader, ExecuteNonQuery and ExecuteScalar.

• ExecuteReader : Use for accessing data. It provides a forward-only, read-only, connected recordset.
• ExecuteNonQuery : Use for data manipulation, such as Insert, Update, Delete.
• ExecuteScalar : Use for retriving 1 row 1 col. value., i.e. Single value. eg: for retriving aggregate function. It is faster than other ways of retriving a single value from DB.


What is the difference between String and StringBuilder?

String: Say for example, Frequently used operation with a string is concatenation. When we use the "String" object to concatenate two strings, the first string is concatenated to the other string by creating a new copy in the memory as a string object, and then the old string is deleted. This process is a little long. Hence we say "Strings are immutable".

StringBuilder: When we use of the "StringBuilder" object, the Append method is used. That is, an insertion is done on the existing string. performance on StringBuilder object is faster than String operations, as the copy is done to the same location. StringBuilder is more efficient in case large amounts of string manipulations than string.


What is Application Domain?

The primary purpose of the AppDomain is to isolate an application from other applications. Win32 processes provide isolation by having distinct memory address spaces. This is effective, but it is expensive and doesn't scale well. The .NET runtime enforces AppDomain isolation by keeping control over the use of memory - all memory in the AppDomain is managed by the .NET runtime, so the runtime can ensure that AppDomains do not access each other's memory.
Objects in different application domains communicate either by transporting copies of objects across application domain boundaries, or by using a proxy to exchange messages.
MarshalByRefObject is the base class for objects that communicate across application domain boundaries by exchanging messages using a proxy. Objects that do not inherit from MarshalByRefObject are implicitly marshal by value. When a remote application references a marshal by value object, a copy of the object is passed across application domain boundaries.


What is Application Domain?

The major purpose of the AppDomain is to isolate an application from other applications. Win32 processes provide isolation by having distinct memory address spaces. This is effective, but it is expensive and doesn't scale well. The .NET runtime enforces AppDomain isolation by keeping control over the use of memory - all memory in the AppDomain is managed by the .NET runtime, so the runtime can ensure that AppDomains do not access each other's memory.
Objects in different application domains communicate either by transporting copies of objects across application domain boundaries, or by using a proxy to exchange messages.
MarshalByRefObject is the base class for objects that communicate across application domain boundaries by exchanging messages using a proxy. Objects that do not inherit from MarshalByRefObject are implicitly marshal by value. When a remote application references a marshal by value object, a copy of the object is passed across application domain boundaries.





What is exception handling?

When an exception occurs, the system searches for the nearest catch clause that can handle the exception, as determined by the run-time type of the exception. First, the current method is searched for a lexically enclosing try statement, and the associated catch clauses of the try statement are considered in order. If that fails, the method that called the current method is searched for a lexically enclosing try statement that encloses the point of the call to the current method. This search continues until a catch clause is found that can handle the current exception, by naming an exception class that is of the same class, or a base class, of the run-time type of the exception being thrown. A catch clause that doesn't name an exception class can handle any exception.
Once a matching catch clause is found, the system prepares to transfer control to the first statement of the catch clause. Before execution of the catch clause begins, the system first executes, in order, any finally clauses that were associated with try statements more nested that than the one that caught the exception.
Exceptions that occur during destructor execution are worth special mention. If an exception occurs during destructor execution, and that exception is not caught, then the execution of that destructor is terminated and the destructor of the base class (if any) is called. If there is no base class (as in the case of the object type) or if there is no base class destructor, then the exception is discarded.


How to remove the spaces in a string "Black and White"?

string strvalue= "Black and White";
string strnewvalue = Regex.Replace(strvalue, " ", "");
Response.Write(strnewvalue);

How can I trigger a submit on my form when the enter key is pressed?
Add this to the body element:

body onkeypress="if(window.event.keyCode==13){ document.FormName.submit();}">
bla bla...
body






Difference between OLEDB Provider and SqlClient Provider ?

SQLClient .NET classes are highly optimized for the .net / sqlserver combination and achieve optimal results. The SqlClient data provider is fast. It's faster than the Oracle provider, and faster than accessing database via the OleDb layer. It's faster because it accesses the native library (which automatically gives you better performance), and it was written with lots of help from the SQL Server team.


Explain role based security ?

Role Based Security lets you identify groups of users to allow or deny based on their role in the organization.In Windows NT and Windows XP, roles map to names used to identify user groups. Windows defines several built-in groups, including Administrators, Users, and Guests.To allow or deny access to certain groups of users, add the element to the authorization list in your Web application's Web.config file.e.g.
< authorization >
< allow roles="Domain Name\Administrators" / > < !-- Allow Administrators in domain. -- >
< deny users="*" / > < !-- Deny anyone else. -- >
< /authorization >


When do you set "" ?

Identity is a webconfig declaration under System.web, which helps to control the application Identity of the web applicaton. Which can be at any level(Machine,Site,application,subdirectory,or page), attribute impersonate with "true" as value specifies that client impersonation is used.


What is view state? where it stored? can we disable it?

The web is state-less protocol, so the page gets instantiated, executed, rendered and then disposed on every round trip to the server. The developers code to add "statefulness" to the page by using Server-side storage for the state or posting the page to itself. When require to persist and read the data in control on webform, developer had to read the values and store them in hidden variable (in the form), which were then used to restore the values. With advent of .NET framework, ASP.NET came up with ViewState mechanism, which tracks the data values of server controls on ASP.NET webform. In effect,ViewState can be viewed as "hidden variable managed by ASP.NET framework!". When ASP.NET page is executed, data values from all server controls on page are collected and encoded as single string, which then assigned to page's hidden atrribute "< input type=hidden >", that is part of page sent to the client.
ViewState value is temporarily saved in the client's browser.ViewState can be disabled for a single control, for an entire page orfor an entire web application.
The syntax is:
Disable ViewState for control (Datagrid in this example)
< asp:datagrid EnableViewState="false" ... / >
Disable ViewState for a page, using Page directive
< %@ Page EnableViewState="False" ... % >
Disable ViewState for application through entry in web.config
< Pages EnableViewState="false" ... / >



Explain < @OutputCache% > and the usage of VaryByParam, VaryByHeader.

OutputCache is used to control the caching policies of an ASP.NET page or user control. To cache a page @OutputCache directive should be defined as follows < %@ OutputCache Duration="100" VaryByParam="none" % >

VaryByParam: A semicolon-separated list of strings used to vary the output cache. By default, these strings correspond to a query string value sent with GET method attributes, or a parameter sent using the POST method. When this attribute is set to multiple parameters, the output cache contains a different version of the requested document for each specified parameter. Possible values include none, *, and any valid query string or POST parameter name.

VaryByHeader: A semicolon-separated list of HTTP headers used to vary the output cache. When this attribute is set to multiple headers, the output cache contains a different version of the requested document for each specified header.


What are the advantages and disadvantages of viewstate?

The primary advantages of the ViewState feature in ASP.NET are:
1. Simplicity. There is no need to write possibly complex code to store form data between page submissions.
2. Flexibility. It is possible to enable, configure, and disable ViewState on a control-by-control basis, choosing to persist the values of some fields but not others.

There are, however a few disadvantages that are worth pointing out:

1. Does not track across pages. ViewState information does not automatically transfer from page to page. With the session approach, values can be stored in the session and accessed from other pages. This is not possible with ViewState, so storing data into the session must be done explicitly.
2. ViewState is not suitable for transferring data for back-end systems. That is, data still has to be

What does the "EnableViewState" property do? Why would I want it on or off?

Enable ViewState turns on the automatic state management feature that enables server controls to re-populate their values on a round trip without requiring you to write any code. This feature is not free however, since the state of a control is passed to and from the server in a hidden form field. You should be aware of when ViewState is helping you and when it is not.
For example, if you are binding a control to data on every round trip, then you do not need the control to maintain it's view state, since you will wipe out any re-populated data in any case. ViewState is enabled for all server controls by default. To disable it, set the EnableViewState property of the control to false.

What is SOA (Service Oriented Architecture)?

Service Oriented Architecture. In SOA you can create an abstract layer that your applications use to access various "services" and can aggregate the services. These services could be databases, web services, message queues or any other sources. The Service Layer will provides a way to access these services that the applications do not need to know how the access is done. For example, to get a full customers record, user might need to get data from a SGL Server database, a web service and a message queue. Service layer hides this from the calling application. All the application knows is that it asked for a full customer record. It doesn't know what system or systems it came from or how it was retrieved



What is Strong Name?

A name that consists of an assembly's identity—its simple text name, version number, and culture information (if provided)—strengthened by a public key and a digital signature generated over the assembly.


What is Code Access Security (CAS)?

Code Access Security (CAS) is the part of the .NET security model that determines whether or not a piece of code is allowed to run, and what resources it can use when it is running. For example, it is CAS that will prevent a .NET web applet from formatting your hard disk.






What are the different namespaces used in the project to connect the database? What data providers available in .net to connect to database?


• System.Data.OleDb – classes that make up the .NET Framework Data Provider for OLE DB-compatible data sources. These classes allow you to connect to an OLE DB data source, execute commands against the source, and read the results.
• System.Data.SqlClient – classes that make up the .NET Framework Data Provider for SQL Server, which allows you to connect to SQL Server 7.0, execute commands, and read results. The System.Data.SqlClient namespace is similar to the System.Data.OleDb namespace, but is optimized for access to SQL Server 7.0 and later.
• System.Data.Odbc - classes that make up the .NET Framework Data Provider for ODBC. These classes allow you to access ODBC data source in the managed space.
• System.Data.OracleClient - classes that make up the .NET Framework Data Provider for Oracle. These classes allow you to access an Oracle data source in the managed space.