Click here to Skip to main content
15,888,984 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan1-Oct-12 7:37
mveRichard MacCutchan1-Oct-12 7:37 
QuestionRe: connection string Web.config + ASP.net C# Pin
jojoba20111-Oct-12 22:04
jojoba20111-Oct-12 22:04 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan2-Oct-12 2:52
mveRichard MacCutchan2-Oct-12 2:52 
QuestionRe: connection string Web.config + ASP.net C# Pin
jojoba20112-Oct-12 3:04
jojoba20112-Oct-12 3:04 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan2-Oct-12 3:26
mveRichard MacCutchan2-Oct-12 3:26 
QuestionRe: connection string Web.config + ASP.net C# Pin
jojoba20112-Oct-12 6:05
jojoba20112-Oct-12 6:05 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan2-Oct-12 6:39
mveRichard MacCutchan2-Oct-12 6:39 
AnswerRe: connection string Web.config + ASP.net C# Pin
jkirkerx2-Oct-12 18:00
professionaljkirkerx2-Oct-12 18:00 
I think this is what your looking for.

Your example makes no sense to me, and I don't see the point of it. If your sql server is loaded on your hard drive, why not use the standard connection string?

As far as using a programmable path like %ProgramFiles%, that's a Windows thing, which works in certain scripting languages and the cmd prompt. I don't think the application that reads the web.config file is smart enough to translate %ProgramFiles% to the proper file path, and if it did, you need to see if it adds the final slash to the end of the path.

You still have to code the database name to make it work. Since it's on your hard drive, a trusted connection should work fine.

Server=.\SQLExpress;AttachDbFilename=c:\asd\qwe\mydbfile.mdf;Database=dbname;
Trusted_Connection=Yes;


[Edit]

If you need connection strings, go here
http://www.connectionstrings.com/[^]

Richard, I was talking to the OP, still getting use to the new look and feel.
GeneralRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan3-Oct-12 1:42
mveRichard MacCutchan3-Oct-12 1:42 
Questionconnection string in webconfig Asp.net C# Pin
Member 94738091-Oct-12 0:05
Member 94738091-Oct-12 0:05 
Questionword document open without dialog Pin
rajaramanperumal30-Sep-12 20:44
rajaramanperumal30-Sep-12 20:44 
QuestionHow to get advanced graphic controls in ASP.Net Pin
Vaibhav Laxman Survase30-Sep-12 19:16
Vaibhav Laxman Survase30-Sep-12 19:16 
QuestionData Controls in ASP.NET Pin
jkmehmi30-Sep-12 7:38
jkmehmi30-Sep-12 7:38 
AnswerRe: Data Controls in ASP.NET Pin
Sandeep Mewara30-Sep-12 7:46
mveSandeep Mewara30-Sep-12 7:46 
GeneralRe: Data Controls in ASP.NET Pin
jkmehmi30-Sep-12 8:15
jkmehmi30-Sep-12 8:15 
Questionasp.net pdf file Pin
Member 946996328-Sep-12 22:44
Member 946996328-Sep-12 22:44 
AnswerRe: asp.net pdf file Pin
Sandeep Mewara28-Sep-12 23:23
mveSandeep Mewara28-Sep-12 23:23 
GeneralFile Upload control in Asp .net Page methods Pin
kkrangs28-Sep-12 22:02
kkrangs28-Sep-12 22:02 
GeneralRe: File Upload control in Asp .net Page methods Pin
jkirkerx29-Sep-12 19:30
professionaljkirkerx29-Sep-12 19:30 
GeneralRe: File Upload control in Asp .net Page methods Pin
kkrangs30-Sep-12 22:04
kkrangs30-Sep-12 22:04 
GeneralRe: File Upload control in Asp .net Page methods Pin
jkirkerx1-Oct-12 6:08
professionaljkirkerx1-Oct-12 6:08 
GeneralRe: File Upload control in Asp .net Page methods Pin
jkirkerx1-Oct-12 7:41
professionaljkirkerx1-Oct-12 7:41 
GeneralRe: File Upload control in Asp .net Page methods Pin
kkrangs10-Oct-12 4:44
kkrangs10-Oct-12 4:44 
GeneralRe: File Upload control in Asp .net Page methods Pin
jkirkerx10-Oct-12 6:42
professionaljkirkerx10-Oct-12 6:42 
GeneralRe: File Upload control in Asp .net Page methods Pin
sarathtamil8-Oct-12 23:59
sarathtamil8-Oct-12 23:59 

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.