Click here to Skip to main content
16,015,296 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionhow do i access my site by http://fedexghana.com instead of http://www.fedexghana.com Pin
dleo102-May-07 9:08
dleo102-May-07 9:08 
AnswerRe: how do i access my site by http://fedexghana.com instead of http://www.fedexghana.com Pin
Guffa2-May-07 9:35
Guffa2-May-07 9:35 
GeneralRe: how do i access my site by http://fedexghana.com instead of http://www.fedexghana.com Pin
dleo108-May-07 0:45
dleo108-May-07 0:45 
QuestionHow to conect database access with web page ? Pin
RikinPandya2-May-07 7:38
RikinPandya2-May-07 7:38 
AnswerRe: How to conect database access with web page ? Pin
Tarakeshwar Reddy2-May-07 7:59
professionalTarakeshwar Reddy2-May-07 7:59 
GeneralRe: How to conect database access with web page ? Pin
RikinPandya2-May-07 8:26
RikinPandya2-May-07 8:26 
GeneralRe: How to conect database access with web page ? Pin
Tarakeshwar Reddy2-May-07 8:35
professionalTarakeshwar Reddy2-May-07 8:35 
GeneralRe: How to conect database access with web page ? Pin
Ibuprofen2-May-07 17:28
Ibuprofen2-May-07 17:28 
I use a data connection web.config file stores path to access database.

private string strConnection =ConfigurationSettings.AppSettings["MYDATACon"];


Then in my pages I string my connections settings.

And here is an example of a page loading a data grid using sql statements.

private void LoadGrid()<br />
{<br />
    GetHelpDeskTIR();<br />
    strSQL="Select RecNumber, TIR,WorkOrder,ShadowStartDate,ShadowStartTime,ShadowEndTime,MethodInvoke from Test_Incident_Report where HelpDesk ='Yes' "+strCondition;<br />
    int count=0;<br />
    bool bIsError=false;<br />
    con = new OleDbConnection(strConnection);<br />
    <br />
    ds = new DataSet();<br />
    <br />
    try<br />
    {<br />
        OleDbDataAdapter da = new OleDbDataAdapter(strSQL,con);<br />
        count=da.Fill(ds);<br />
    }<br />
    catch(Exception err)<br />
    {<br />
        bIsError=true;<br />
    }<br />
    finally<br />
    {<br />
        con.Close();<br />
    }<br />
    if(!bIsError)<br />
    {<br />
        if(count!=0)<br />
        {<br />
            DataGrid1.DataSource=ds;<br />
            DataGrid1.DataBind();<br />
        }<br />
        else<br />
            SendUserAMessage("There are no HelpDesk records to validate at this time.");<br />
    }<br />
}

GeneralRe: How to conect database access with web page ? Pin
Tarakeshwar Reddy3-May-07 2:32
professionalTarakeshwar Reddy3-May-07 2:32 
GeneralRe: How to conect database access with web page ? Pin
Ibuprofen3-May-07 2:35
Ibuprofen3-May-07 2:35 
GeneralRe: How to conect database access with web page ? Pin
Tarakeshwar Reddy3-May-07 2:38
professionalTarakeshwar Reddy3-May-07 2:38 
GeneralRe: How to conect database access with web page ? Pin
Sandeep Akhare2-May-07 19:52
Sandeep Akhare2-May-07 19:52 
QuestionJava script in Master pages Pin
seemamltn2-May-07 7:16
seemamltn2-May-07 7:16 
AnswerRe: Java script in Master pages Pin
kubben2-May-07 7:26
kubben2-May-07 7:26 
AnswerRe: Java script in Master pages Pin
ToddHileHoffer2-May-07 7:54
ToddHileHoffer2-May-07 7:54 
GeneralRe: Java script in Master pages Pin
richmanbob2-May-07 15:40
richmanbob2-May-07 15:40 
QuestionOleDB Image Pin
nc3b2-May-07 6:59
nc3b2-May-07 6:59 
QuestionRe: OleDB Image Pin
nc3b2-May-07 9:31
nc3b2-May-07 9:31 
AnswerRe: OleDB Image Pin
Guffa2-May-07 9:49
Guffa2-May-07 9:49 
GeneralRe: OleDB Image Pin
nc3b3-May-07 0:13
nc3b3-May-07 0:13 
AnswerRe: OleDB Image Pin
Guffa3-May-07 1:11
Guffa3-May-07 1:11 
GeneralRe: OleDB Image Pin
nc3b3-May-07 1:26
nc3b3-May-07 1:26 
GeneralWhy is this Pin
nc3b3-May-07 1:36
nc3b3-May-07 1:36 
GeneralRe: Why is this Pin
nc3b4-May-07 2:51
nc3b4-May-07 2:51 
QuestionMaster page Controls Pin
metbinu2003@yahoo.com2-May-07 5:32
metbinu2003@yahoo.com2-May-07 5:32 

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.