Click here to Skip to main content
15,907,326 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Barcharts Pin
member272-Mar-09 21:30
member272-Mar-09 21:30 
QuestionAbandoning Session not logging out Pin
Tristan Rhodes2-Mar-09 2:40
Tristan Rhodes2-Mar-09 2:40 
AnswerRe: Abandoning Session not logging out Pin
Abhishek Sur2-Mar-09 2:53
professionalAbhishek Sur2-Mar-09 2:53 
QuestionASP.NET Problem with IO.Directory.GetFiles Pin
Larvex2-Mar-09 2:23
Larvex2-Mar-09 2:23 
AnswerRe: ASP.NET Problem with IO.Directory.GetFiles Pin
Abhishek Sur2-Mar-09 2:54
professionalAbhishek Sur2-Mar-09 2:54 
GeneralRe: ASP.NET Problem with IO.Directory.GetFiles Pin
Larvex2-Mar-09 3:40
Larvex2-Mar-09 3:40 
GeneralRe: ASP.NET Problem with IO.Directory.GetFiles Pin
Larvex2-Mar-09 4:57
Larvex2-Mar-09 4:57 
GeneralRe: ASP.NET Problem with IO.Directory.GetFiles Pin
pnslcs2-Mar-09 9:24
pnslcs2-Mar-09 9:24 
GeneralRe: ASP.NET Problem with IO.Directory.GetFiles Pin
Larvex3-Mar-09 0:18
Larvex3-Mar-09 0:18 
QuestionUpdate Connection String Pin
Vimalsoft(Pty) Ltd2-Mar-09 1:53
professionalVimalsoft(Pty) Ltd2-Mar-09 1:53 
AnswerRe: Update Connection String Pin
J4amieC2-Mar-09 2:12
J4amieC2-Mar-09 2:12 
GeneralRe: Update Connection String Pin
Greg Chelstowski2-Mar-09 2:13
Greg Chelstowski2-Mar-09 2:13 
GeneralRe: Update Connection String Pin
Vimalsoft(Pty) Ltd2-Mar-09 2:23
professionalVimalsoft(Pty) Ltd2-Mar-09 2:23 
AnswerRe: Update Connection String Pin
Greg Chelstowski2-Mar-09 2:12
Greg Chelstowski2-Mar-09 2:12 
GeneralRe: Update Connection String Pin
Vimalsoft(Pty) Ltd2-Mar-09 2:31
professionalVimalsoft(Pty) Ltd2-Mar-09 2:31 
GeneralRe: Update Connection String Pin
Greg Chelstowski2-Mar-09 2:41
Greg Chelstowski2-Mar-09 2:41 
GeneralRe: Update Connection String Pin
Vimalsoft(Pty) Ltd2-Mar-09 2:47
professionalVimalsoft(Pty) Ltd2-Mar-09 2:47 
GeneralRe: Update Connection String Pin
Greg Chelstowski2-Mar-09 2:53
Greg Chelstowski2-Mar-09 2:53 
GeneralRe: Update Connection String Pin
Vimalsoft(Pty) Ltd2-Mar-09 19:45
professionalVimalsoft(Pty) Ltd2-Mar-09 19:45 
GeneralRe: Update Connection String Pin
Greg Chelstowski2-Mar-09 20:50
Greg Chelstowski2-Mar-09 20:50 
OK, now look.
Obviously, your UpdateConfig() method is not going to physically alter the web.config.
The connection string you want to use is only going to work with just one session, and that's a good thing. Instead of keeping just the database name in your session variable, store the whole connection string.
If you do not want to, change your UpdateConfig() method (and change its name too, cos it's confusing) like so:
private string GetConnectionString(string DB) // where DB is your database name from the session
{

        string connString = ConfigurationManager.ConnectionStrings["string1"].ConnectionString;
        if (Session["ActiveDatabase"] != null)
        {
            return connString.Replace("NEWDT", DB);
        }
        else
        {
            return  connString.Replace("NEWDT", "oDirectv3");
        }

}


Anytime you want to use the connection string, just call this function to return it to you.

var question = (_2b || !(_2b));

GeneralRe: Update Connection String Pin
Vimalsoft(Pty) Ltd4-Mar-09 1:27
professionalVimalsoft(Pty) Ltd4-Mar-09 1:27 
QuestionCan i use my own User Registartion Information Class with ASP .NET Login controls Pin
The One2-Mar-09 1:49
The One2-Mar-09 1:49 
AnswerRe: Can i use my own User Registartion Information Class with ASP .NET Login controls Pin
Abhishek Sur2-Mar-09 3:55
professionalAbhishek Sur2-Mar-09 3:55 
QuestionError occuring while developin with ASP.NET Pin
VeeKeyBee2-Mar-09 1:46
VeeKeyBee2-Mar-09 1:46 
AnswerRe: Error occuring while developin with ASP.NET Pin
Vimalsoft(Pty) Ltd2-Mar-09 1:54
professionalVimalsoft(Pty) Ltd2-Mar-09 1:54 

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.