- In Server.transfer their is no round trip while Response.redirect has a round trip hence puts a load on the server.
- Using Sever.transfer you cannot redirect to a different server itself while using Response.redirect you can redirect to a different server also.
basically this is a a my own blog to help ma students and friends with sharing useful information with the. information regarding C language code. .net applications, .net projects. general technical information. notes.
Sunday, 20 May 2012
difference between response.redirect and server.transfer
Page Life Cycle in asp.net
| Page Event | Use of Event |
| PreInit |
|
| Init |
|
| InitComplete |
|
| PreLoad |
|
| PageLoad |
|
| Control events |
|
| LoadComplete |
|
| PreRender |
|
| PreRenderComplete |
|
| SaveStateComplete |
|
| Unload |
|
Thursday, 5 April 2012
Difference between struct and classes
Struct |
Classes |
| 1. The struct is value type | 1. The class is reference type |
| 2. It inherits from System.ValueType | 2.It inherits from the System.Object Type |
| 3. The struct value will be stored on the stack memory. | 3.The class object is stored on the heap memory. |
| 4. Cannot implement Inheritance | 4.implement Inheritance |
| 5.The struct can have only constructor. | 5.The class can have the constructor and destructor. |
| 6. The struct can't initialize at the time of declaration. | 6. The class can have the initializes fields. |
Friday, 9 March 2012
How to upload a website in asp.net
1. To Uplaod a website you have to build Your Website first
2. Go to Solution Explorer
3. Build Application To check the errors and make required changes in
webconfig File. eg connection string
4. Than again right click on application and select Publish Website option
Publish wizard will open.
5. set the loaction for precomplied folder.
6. clcik Ok
7. You will get Your Precompiled folder.
8. Now Upload that Folder on your Hosting account using any Ftp Program such
as Filezilla or cuteftp or any Other Program.
9. Enter Your Credential and Login
10 Upload Your Precomplied Folder to root folder of webhosting Account.
Conatct me at aman0716@gmail.com regarding any Problem.
Saturday, 14 January 2012
Program for Leap year Checking
#include |
Write a Program to check an integer for perfect square
#include |
Conversion of Centigrade temperature to fahrenheit
#include |
Write a Program to Convert KiloMeter into Meter,Centimeter,Inch
#include |
Sunday, 25 December 2011
Get List Of All Printers
To Getting List of All Printers First of all add a namespace System.Drawing.Printing use Foreach Loop: foreach(string printer in PrinterSettings.InstalledPrinters) { Combobox1.Items.Add(Printer.ToString()); } using this you get list of all printer install on your system |
Saturday, 24 December 2011
Select Second Maximum From a Table in Sql
| Q.Find Second Maximum From a Table in Sql |
select max(duration) from course where duration<(select max(duration) from course) OR
|
Wednesday, 7 December 2011
EditTable Listbox
To create a edittable list box take a list box and enter items in it.now select the list box double click event from event list. |
Tuesday, 22 November 2011
Interchange Values of Two numbers Without using third variable
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter First number=");
scanf("%d",&a);
printf("Enter Second number=");
scanf("%d",&b);
a=a+b;
b=a-b;
a=a-b;
printf("a is=%d\n",a);
printf("b is=%d",b);
getch();
}
Earn upto Rs. 9,000 pm checking Emails. Join now!
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter First number=");
scanf("%d",&a);
printf("Enter Second number=");
scanf("%d",&b);
a=a+b;
b=a-b;
a=a-b;
printf("a is=%d\n",a);
printf("b is=%d",b);
getch();
}
Interchange Values of Two numbers
| #include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("Enter First number="); scanf("%d",&a); printf("Enter Second number="); scanf("%d",&b); c=a; a=b; b=c; printf("a is=%d\n",a); printf("b is=%d",b); getch(); } Earn upto Rs. 9,000 pm checking Emails. Join now! |
Monday, 21 November 2011
Write a Program to calculate area of a Rectangle
| #include<conio.h> #include<stdio.h> void main() { int length,breadth,area_of_rectangle; clrscr(); printf("Enter the Length="); scanf("%d",&length); printf("Enter the Breadth="); scanf("%d",&breadth); area_of_rectangle=length*breadth; printf("Area of rectnagle is=%d",area_of_rectangle); getch(); } |
Write a Program to calculate area of a circle
| #include<conio.h> #include<stdio.h> void main() { double radius,area_of_circle; clrscr(); printf("Enter the radius="); scanf("%lf",&radius); area_of_circle=3.14*radius*radius; printf("Area of Circle is=%lf",area_of_circle); getch(); } |
Tuesday, 15 November 2011
Sunday, 13 November 2011
If a five-digit number is input through the keyboard,write a program to reverse the number?
/*Reverse a Number*/
#include<stdio.h>
#include<conio.h>
void main()
{
int number,reverse_number;
clrscr();
printf("Enter the Number you want to reverse:");
scanf("%d",&number);
/*we use while loop and '%' to seprate a number*/
printf("Reverse number is:");
while(number>0)
{
reverse_number=number%10;
number=number/10;//update number
printf("%d",reverse_number);
}
getch();
} |
If a five-digit number is input through the keyboard ,write a program to calculate the sum of its digit?
/*Sum of Digit of a Number*/ #include |
Concept of Strong name
strong name is used for unique id for.net assembly. it is used when we need to deploy assembly in Gac(global Assembly cache). How to generate Strong namego to visual studio tools> Visual studio Command Prompt There is command prompt window With C:\program files\visual studio 9.0\Vc\ to create strong name type sn.exe -k "c:\test.snk" C:\program files\visual studio 9.0\Vc\sn.exe -k "c:\test.snk" -k is key value parameter and "c:\test.snk" is location to save file after that press enter nd u get key pair return to "path" For using strong Name in Class libraryin Visual Studio go to Projects > Class library1 properties. > signing make use a key radio button Checked nd browse Location of test.snk nd use test.snk in your Class Library |
Different Methods to Pass Values between Web Forms
Different Methods to Pass Values between Web FormsCross page posting means to post data from one page to another page.this is an important concept in web development.there are many methods to perform this task.some of Them are following. Cookies:A small piece of information or message sent by the web server to User's web browser during a request, which is stored on user's system in the form of a text file(mostly as notepad file). How to use a cookie. HttpCookie samplecookie = new HttpCookie("mycookie");
samplecookie.Value = TextBox1.Text;
samplecookie.Expires = DateTime.Now.AddHours(1);
Response.Cookies.Add(samplecookie);
Response.Redirect("default2.aspx");
ON Second pageRetrive value using cookies.Label1.Text = Request.Cookies["mycookie"].Value; Query Stringthis is another way to pass value between pages.in it we have to use a question mark (?) as separator. "&" is use to pass multiple query strings. how to use querystring Response.Redirect("default2.aspx?pass="+TextBox2.Text);
Retrieve value using Querystring Label2.Text = Request.QueryString["pass"] Sessionsit is server side state management method.this is most secure and most acceptable way of cross page postinghow to use session on page.Session["user"] = txtName.Text; on second pagestring str=Session["user"].ToString(); |
Subscribe to:
Posts (Atom)