Click here to Skip to main content
15,914,594 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Solution for Use of Webservices in Firefox using Javascript Pin
Abubakarsb2-Sep-07 3:08
Abubakarsb2-Sep-07 3:08 
GeneralRe: Solution for Use of Webservices in Firefox using Javascript Pin
Michael Sync2-Sep-07 15:56
Michael Sync2-Sep-07 15:56 
QuestionHow to generate dynamic columns and display dates in gridview Pin
yasmaha2-Sep-07 0:37
yasmaha2-Sep-07 0:37 
AnswerRe: How to generate dynamic columns and display dates in gridview Pin
Vasudevan Deepak Kumar2-Sep-07 0:53
Vasudevan Deepak Kumar2-Sep-07 0:53 
QuestionconnectionStrings Pin
SaharMoj1-Sep-07 23:35
SaharMoj1-Sep-07 23:35 
AnswerRe: connectionStrings Pin
John-ph1-Sep-07 23:50
John-ph1-Sep-07 23:50 
AnswerRe: connectionStrings Pin
Vasudevan Deepak Kumar1-Sep-07 23:51
Vasudevan Deepak Kumar1-Sep-07 23:51 
AnswerRe: connectionStrings Pin
Michael Sync2-Sep-07 0:05
Michael Sync2-Sep-07 0:05 
ASP.NET 1.1

<appSettings>
<add key="ConnectionInfo" value="server=(local);database=Northwind;Integrated Security=SSPI" />
</appSettings>


Reading this string from code ~

ConfigurationSettings.AppSettings["ConnectionInfo"];

ASP.NET 2.0,
<connectionStrings>
<add name="YourConnectionString" connectionString="Data Source=YourSQLServer; Initial Catalog=YourDatabase; User ID=YourUserID; Password=YourPassword" providerName="System.Data.SqlClient" />
</connectionStrings>



Reading this string from code ~

<br />
if (((ConfigurationManager.ConnectionStrings("YourConnectionString") == null)<br />
                    || _)) {<br />
            ConfigurationManager.ConnectionStrings("YourConnectionString").ConnectionString.Trim() = "";<br />
            throw new Exception("Connection Error");<br />
        }<br />
        else {<br />
            conn.ConnectionString = ConfigurationManager.ConnectionStrings("YourConnectionString").ConnectionString;<br />
        }






Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)

If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. Smile | :)

AnswerRe: connectionStrings Pin
Ahmad Adnan2-Sep-07 2:44
Ahmad Adnan2-Sep-07 2:44 
AnswerRe: connectionStrings Pin
Paul Conrad2-Sep-07 5:35
professionalPaul Conrad2-Sep-07 5:35 
Answerjameeye iranian:ConnectionString Pin
Abolfazl Sheikhloo2-Sep-07 20:17
Abolfazl Sheikhloo2-Sep-07 20:17 
QuestionMake modal page by asp.net ajax Pin
morteza571-Sep-07 23:11
morteza571-Sep-07 23:11 
AnswerRe: Make modal page by asp.net ajax Pin
Vasudevan Deepak Kumar1-Sep-07 23:54
Vasudevan Deepak Kumar1-Sep-07 23:54 
GeneralRe: Make modal page by asp.net ajax Pin
morteza572-Sep-07 1:24
morteza572-Sep-07 1:24 
Questiondinamic textbox in gridview Pin
Abolfazl Sheikhloo1-Sep-07 21:38
Abolfazl Sheikhloo1-Sep-07 21:38 
AnswerRe: dinamic textbox in gridview Pin
Saksida Bojan1-Sep-07 22:12
Saksida Bojan1-Sep-07 22:12 
GeneralRe: dinamic textbox in gridview Pin
Abolfazl Sheikhloo1-Sep-07 22:32
Abolfazl Sheikhloo1-Sep-07 22:32 
GeneralRe: dinamic textbox in gridview Pin
Saksida Bojan1-Sep-07 23:09
Saksida Bojan1-Sep-07 23:09 
QuestionDateTime.Now incorrect format (windows vista)?? Pin
Nada Adel1-Sep-07 21:30
Nada Adel1-Sep-07 21:30 
AnswerRe: DateTime.Now incorrect format (windows vista)?? Pin
Saksida Bojan1-Sep-07 22:07
Saksida Bojan1-Sep-07 22:07 
GeneralRe: DateTime.Now incorrect format (windows vista)?? Pin
Nada Adel1-Sep-07 22:14
Nada Adel1-Sep-07 22:14 
GeneralRe: DateTime.Now incorrect format (windows vista)?? Pin
Saksida Bojan1-Sep-07 23:06
Saksida Bojan1-Sep-07 23:06 
AnswerRe: DateTime.Now incorrect format (windows vista)?? Pin
Vasudevan Deepak Kumar1-Sep-07 23:55
Vasudevan Deepak Kumar1-Sep-07 23:55 
AnswerRe: DateTime.Now incorrect format (windows vista)?? Pin
Ahmad Adnan2-Sep-07 2:55
Ahmad Adnan2-Sep-07 2:55 
AnswerRe: DateTime.Now incorrect format (windows vista)?? Pin
WillyBeamish2-Sep-07 3:57
WillyBeamish2-Sep-07 3:57 

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.