Click here to Skip to main content
15,912,897 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Performance Issue Pin
Member 195080920-Nov-08 1:04
Member 195080920-Nov-08 1:04 
GeneralRe: Performance Issue Pin
Paddy Boyd20-Nov-08 1:09
Paddy Boyd20-Nov-08 1:09 
GeneralRe: Performance Issue Pin
Member 195080920-Nov-08 1:35
Member 195080920-Nov-08 1:35 
GeneralRe: Performance Issue Pin
Paddy Boyd20-Nov-08 1:39
Paddy Boyd20-Nov-08 1:39 
GeneralRe: Performance Issue Pin
Member 195080920-Nov-08 1:59
Member 195080920-Nov-08 1:59 
AnswerRe: Performance Issue Pin
Guffa20-Nov-08 0:57
Guffa20-Nov-08 0:57 
AnswerRe: Performance Issue Pin
Abhijit Jana20-Nov-08 3:13
professionalAbhijit Jana20-Nov-08 3:13 
QuestionScope of Object Variables Pin
yogesh_kumar_agarwal19-Nov-08 22:15
yogesh_kumar_agarwal19-Nov-08 22:15 
Hi, All

I just start a new program i asp.net and it confuse me in some basic concept. as you can see i just create a public class named connection then i want to initialize it on page load.

but when ever i click on any of the button, it give me the error null reference error whats wrong in ASP.NET, because same work with the windows application with C#.

plz do reply

regards
Yogesh Agarwal

public partial class Admin_Default : System.Web.UI.Page
{
    Connection con;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
            con = new Connection();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        con.skysconnection();
        //some task
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        con.skysconnection();
        //some task


    }
    
}

AnswerRe: Scope of Object Variables Pin
simsen19-Nov-08 22:55
simsen19-Nov-08 22:55 
GeneralRe: Scope of Object Variables Pin
yogesh_kumar_agarwal19-Nov-08 23:33
yogesh_kumar_agarwal19-Nov-08 23:33 
AnswerRe: Scope of Object Variables Pin
Samer Aburabie19-Nov-08 23:01
Samer Aburabie19-Nov-08 23:01 
GeneralRe: Scope of Object Variables Pin
yogesh_kumar_agarwal19-Nov-08 23:31
yogesh_kumar_agarwal19-Nov-08 23:31 
GeneralRe: Scope of Object Variables Pin
Samer Aburabie19-Nov-08 23:36
Samer Aburabie19-Nov-08 23:36 
QuestionDrag and Drop label into textbox [modified] Pin
Member 282396219-Nov-08 20:21
Member 282396219-Nov-08 20:21 
GeneralASP.Net with Apache Pin
kavithakcross19-Nov-08 18:32
kavithakcross19-Nov-08 18:32 
GeneralRe: ASP.Net with Apache Pin
Parwej Ahamad19-Nov-08 19:11
professionalParwej Ahamad19-Nov-08 19:11 
GeneralRe: ASP.Net with Apache Pin
kavithakcross19-Nov-08 20:12
kavithakcross19-Nov-08 20:12 
GeneralRe: ASP.Net with Apache Pin
Parwej Ahamad19-Nov-08 21:53
professionalParwej Ahamad19-Nov-08 21:53 
GeneralRe: ASP.Net with Apache Pin
kavithakcross19-Nov-08 22:43
kavithakcross19-Nov-08 22:43 
QuestionNeed help with IIS authentication Pin
Rajeevg19-Nov-08 18:29
Rajeevg19-Nov-08 18:29 
QuestionReport Viewer Pin
kenexcelon19-Nov-08 14:19
kenexcelon19-Nov-08 14:19 
AnswerRe: Report Viewer Pin
Samer Aburabie19-Nov-08 14:44
Samer Aburabie19-Nov-08 14:44 
GeneralRe: Report Viewer Pin
kenexcelon20-Nov-08 14:52
kenexcelon20-Nov-08 14:52 
Questionexport to excel from asp.net Pin
Member 141625419-Nov-08 13:16
Member 141625419-Nov-08 13:16 
AnswerRe: export to excel from asp.net Pin
Samer Aburabie20-Nov-08 15:25
Samer Aburabie20-Nov-08 15:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.