Click here to Skip to main content
15,922,166 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionGenerate .txt file [modified] Pin
Imran Khan Pathan25-Jul-07 18:49
Imran Khan Pathan25-Jul-07 18:49 
QuestionHow to solve IIS Problem ? Pin
pubududilena25-Jul-07 18:11
pubududilena25-Jul-07 18:11 
QuestionDifference between Error and Defect and Bug..? Pin
codingrocks25-Jul-07 17:53
codingrocks25-Jul-07 17:53 
AnswerRe: Difference between Error and Defect and Bug..? [modified] Pin
Sonia Gupta25-Jul-07 18:13
Sonia Gupta25-Jul-07 18:13 
AnswerRe: Difference between Error and Defect and Bug..? Pin
BasharatAli25-Jul-07 18:32
BasharatAli25-Jul-07 18:32 
AnswerRe: Difference between Error and Defect and Bug..? Pin
Christian Graus25-Jul-07 18:47
protectorChristian Graus25-Jul-07 18:47 
GeneralRe: Difference between Error and Defect and Bug..? Pin
Urs Enzler25-Jul-07 20:24
Urs Enzler25-Jul-07 20:24 
Questionreduce this big code Pin
duo!@#25-Jul-07 17:41
duo!@#25-Jul-07 17:41 
OMG | :OMG: Is any able to reduce this code to a minimal try~~!!!
<br />
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load<br />
If Not IsPostBack Then<br />
Dim conn1 As New Data.SqlClient.SqlConnection("datasource=.\SQLEXPRESS;initial catalog=C:\DOCUMENTS AND SETTINGS\PROJ\APP_DATA\DATABASE.MDF;integrated security = true")<br />
<br />
            Dim sql1 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=101", conn1)<br />
            Dim sql2 As New Data.SqlClient.SqlCommand("select status from carpark where  Lot_id=102", conn1)<br />
            Dim sql3 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=103", conn1)<br />
            Dim sql4 As New Data.SqlClient.SqlCommand("select status from carpark where  Lot_id=104", conn1)<br />
            Dim sql5 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=201", conn1)<br />
            Dim sql6 As New Data.SqlClient.SqlCommand("select status from carpark where  Lot_id=202", conn1)<br />
            Dim sql7 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=203", conn1)<br />
            Dim sql8 As New Data.SqlClient.SqlCommand("select status from carpark where  Lot_id=204", conn1)<br />
            Dim sql9 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=301", conn1)<br />
            Dim sql10 As New Data.SqlClient.SqlCommand("select status from carpark where  Lot_id=302", conn1)<br />
            Dim sql11 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=303", conn1)<br />
            Dim sql12 As New Data.SqlClient.SqlCommand("select status from carpark where  Lot_id=304", conn1)<br />
            <br />
            Dim haha1 As String<br />
            Dim haha2 As String<br />
            Dim haha3 As String<br />
            Dim haha4 As String<br />
            Dim haha5 As String<br />
            Dim haha6 As String<br />
            Dim haha7 As String<br />
            Dim haha8 As String<br />
            Dim haha9 As String<br />
            Dim haha10 As String<br />
            Dim haha11 As String<br />
            Dim haha12 As String<br />
<br />
            conn1.Open()<br />
<br />
            haha1 = CStr(sql1.ExecuteScalar)<br />
            haha2 = CStr(sql2.ExecuteScalar)<br />
            haha3 = CStr(sql3.ExecuteScalar)<br />
            haha4 = CStr(sql4.ExecuteScalar)<br />
            haha5 = CStr(sql5.ExecuteScalar)<br />
            haha6 = CStr(sql6.ExecuteScalar)<br />
            haha7 = CStr(sql7.ExecuteScalar)<br />
            haha8 = CStr(sql8.ExecuteScalar)<br />
            haha9 = CStr(sql9.ExecuteScalar)<br />
            haha10 = CStr(sql10.ExecuteScalar)<br />
            haha11 = CStr(sql11.ExecuteScalar)<br />
            haha12 = CStr(sql12.ExecuteScalar)<br />
            If haha1 = "occupied" Then<br />
                Label2.BackColor = Drawing.Color.Green<br />
                Label1.Text = "101 is available"<br />
            Else<br />
                Label2.BackColor = Drawing.Color.Red<br />
                Label1.Text = "101 is not available"<br />
            End If<br />
<br />
            If haha2 = "occupied" Then<br />
                Label4.BackColor = Drawing.Color.Green<br />
                Label3.Text = "102 is available"<br />
            Else<br />
                Label4.BackColor = Drawing.Color.Red<br />
                Label3.Text = "102 is not available"<br />
            End If<br />
            <br />
            If haha3 = "occupied" Then<br />
                Label6.BackColor = Drawing.Color.Green<br />
                Label5.Text = "103 is available"<br />
            Else<br />
                Label6.BackColor = Drawing.Color.Red<br />
                Label5.Text = "103 is not available"<br />
            End If<br />
            <br />
            If haha4 = "occupied" Then<br />
                Label8.BackColor = Drawing.Color.Green<br />
                Label7.Text = "104 is available"<br />
            Else<br />
                Label8.BackColor = Drawing.Color.Red<br />
                Label7.Text = "104 is not available"<br />
            End If<br />
            <br />
            If haha5 = "occupied" Then<br />
                Label10.BackColor = Drawing.Color.Green<br />
                Label9.Text = "201` is available"<br />
            Else<br />
                Label10.BackColor = Drawing.Color.Red<br />
                Label9.Text = "201 is not available"<br />
            End If<br />
            <br />
            If haha6 = "occupied" Then<br />
                Label12.BackColor = Drawing.Color.Green<br />
                Label11.Text = "202 is available"<br />
            Else<br />
                Label12.BackColor = Drawing.Color.Red<br />
                Label11.Text = "202 is not available"<br />
            End If<br />
            <br />
            If haha7 = "occupied" Then<br />
                Label14.BackColor = Drawing.Color.Green<br />
                Label13.Text = "203 is available"<br />
            Else<br />
                Label14.BackColor = Drawing.Color.Red<br />
                Label13.Text = "203 is not available"<br />
            End If<br />
            <br />
            If haha8 = "occupied" Then<br />
                Label16.BackColor = Drawing.Color.Green<br />
                Label15.Text = "204 is available"<br />
            Else<br />
                Label16.BackColor = Drawing.Color.Red<br />
                Label15.Text = "204 is not available"<br />
            End If<br />
            <br />
            If haha9 = "occupied" Then<br />
                Label18.BackColor = Drawing.Color.Green<br />
                Label17.Text = "301 is available"<br />
            Else<br />
                Label18.BackColor = Drawing.Color.Red<br />
                Label17.Text = "301 is not available"<br />
            End If<br />
            <br />
            If haha10 = "occupied" Then<br />
                Label20.BackColor = Drawing.Color.Green<br />
                Label19.Text = "302 is available"<br />
            Else<br />
                Label20.BackColor = Drawing.Color.Red<br />
                Label19.Text = "302 is not available"<br />
            End If<br />
            <br />
            If haha11 = "occupied" Then<br />
                Label22.BackColor = Drawing.Color.Green<br />
                Label21.Text = "303 is available"<br />
            Else<br />
                Label22.BackColor = Drawing.Color.Red<br />
                Label21.Text = "303 is not available"<br />
            End If<br />
            <br />
            If haha12 = "occupied" Then<br />
                Label24.BackColor = Drawing.Color.Green<br />
                Label23.Text = "304 is available"<br />
            Else<br />
                Label24.BackColor = Drawing.Color.Red<br />
                Label23.Text = "304 is not available"<br />
            End If<br />
            conn1.Close()<br />
        End If<br />
    End Sub<br />

AnswerRe: reduce this big code Pin
Imran Khan Pathan25-Jul-07 18:39
Imran Khan Pathan25-Jul-07 18:39 
GeneralRe: reduce this big code Pin
duo!@#26-Jul-07 15:18
duo!@#26-Jul-07 15:18 
AnswerRe: reduce this big code Pin
Christian Graus25-Jul-07 18:50
protectorChristian Graus25-Jul-07 18:50 
GeneralRe: reduce this big code Pin
Brady Kelly25-Jul-07 23:23
Brady Kelly25-Jul-07 23:23 
GeneralRe: reduce this big code Pin
duo!@#26-Jul-07 15:22
duo!@#26-Jul-07 15:22 
GeneralRe: reduce this big code Pin
Brady Kelly26-Jul-07 20:23
Brady Kelly26-Jul-07 20:23 
GeneralRe: reduce this big code Pin
duo!@#26-Jul-07 20:45
duo!@#26-Jul-07 20:45 
GeneralRe: reduce this big code Pin
duo!@#26-Jul-07 15:25
duo!@#26-Jul-07 15:25 
AnswerRe: reduce this big code Pin
Sonia Gupta25-Jul-07 18:50
Sonia Gupta25-Jul-07 18:50 
AnswerRe: reduce this big code Pin
Brady Kelly27-Jul-07 3:56
Brady Kelly27-Jul-07 3:56 
GeneralRe: reduce this big code Pin
duo!@#29-Jul-07 16:04
duo!@#29-Jul-07 16:04 
GeneralRe: reduce this big code Pin
Brady Kelly29-Jul-07 21:43
Brady Kelly29-Jul-07 21:43 
QuestionDeployement of web application Issue Pin
padmaja_200625-Jul-07 17:35
padmaja_200625-Jul-07 17:35 
QuestionMenu Control Formatting Pin
dwreck_stg25-Jul-07 15:50
dwreck_stg25-Jul-07 15:50 
AnswerRe: Menu Control Formatting Pin
dwreck_stg26-Jul-07 3:23
dwreck_stg26-Jul-07 3:23 
QuestionSSO Help Pin
Ridge Howison25-Jul-07 12:59
Ridge Howison25-Jul-07 12:59 
QuestionDisplay text with label [modified] Pin
ASPnoob25-Jul-07 12:48
ASPnoob25-Jul-07 12:48 

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.