Click here to Skip to main content
15,917,702 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Can you help to me Pin
Vimalsoft(Pty) Ltd10-May-09 23:54
professionalVimalsoft(Pty) Ltd10-May-09 23:54 
QuestionStatic property of class Pin
vnsraj10-May-09 21:49
vnsraj10-May-09 21:49 
AnswerRe: Static property of class Pin
vishalg_gupta10-May-09 22:26
vishalg_gupta10-May-09 22:26 
GeneralRe: Static property of class Pin
vnsraj10-May-09 22:55
vnsraj10-May-09 22:55 
GeneralRe: Static property of class Pin
vishalg_gupta11-May-09 0:05
vishalg_gupta11-May-09 0:05 
AnswerRe: Static property of class Pin
Greg Chelstowski10-May-09 22:33
Greg Chelstowski10-May-09 22:33 
AnswerRe: Static property of class Pin
N a v a n e e t h10-May-09 23:03
N a v a n e e t h10-May-09 23:03 
GeneralRe: Static property of class Pin
vnsraj10-May-09 23:22
vnsraj10-May-09 23:22 
But how can I used session variable in class file, its through "Objects reference not set to be instant of an objects". Please check my class file.

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.SessionState;



namespace MyStore
{



public class GetConnection
{
static string _conString = null;


public GetConnection()
{
//
// TODO: Add constructor logic here
//


}

public static String DBConnectionString
{
get
{
if (HttpContext.Current.Session["ConnStr"] != null)
{
return HttpContext.Current.Session["ConnStr"].ToString();
}
else
{
return "";
}
}
set
{
HttpContext.Current.Session["ConnStr"] = value;
}
}

}
}
GeneralRe: Static property of class Pin
Greg Chelstowski10-May-09 23:52
Greg Chelstowski10-May-09 23:52 
QuestionRegular expression Pin
jayarajRaman10-May-09 21:17
jayarajRaman10-May-09 21:17 
AnswerRe: Regular expression Pin
Ashfield11-May-09 1:25
Ashfield11-May-09 1:25 
QuestionLog Out issue Pin
nitin_ion10-May-09 20:52
nitin_ion10-May-09 20:52 
AnswerRe: Log Out issue Pin
Yaazi10-May-09 21:12
Yaazi10-May-09 21:12 
AnswerRe: Log Out issue Pin
dotnetmember10-May-09 21:28
dotnetmember10-May-09 21:28 
GeneralRe: Log Out issue Pin
nitin_ion10-May-09 21:53
nitin_ion10-May-09 21:53 
AnswerRe: Log Out issue Pin
Abhishek Sur10-May-09 22:43
professionalAbhishek Sur10-May-09 22:43 
AnswerRe: Log Out issue Pin
specialdreamsin11-May-09 20:04
specialdreamsin11-May-09 20:04 
QuestionMasterPage Link Problem Pin
Yaazi10-May-09 20:50
Yaazi10-May-09 20:50 
Questionquerystring Pin
Anjani Poornima10-May-09 20:22
Anjani Poornima10-May-09 20:22 
AnswerRe: querystring Pin
saravanan0510-May-09 23:18
saravanan0510-May-09 23:18 
QuestionSpecified cast is not valid Pin
saravanan0510-May-09 18:33
saravanan0510-May-09 18:33 
AnswerRe: Specified cast is not valid Pin
dotnetmember10-May-09 19:02
dotnetmember10-May-09 19:02 
QuestionHow to Impersonate local system account in c# Pin
Cafedreamz10-May-09 15:36
Cafedreamz10-May-09 15:36 
AnswerRe: How to Impersonate local system account in c# Pin
N a v a n e e t h10-May-09 16:23
N a v a n e e t h10-May-09 16:23 
QuestionHow to place a calendar control in a dropdown list??? Pin
harissssss10-May-09 10:13
harissssss10-May-09 10:13 

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.