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

ASP.NET

 
GeneralRe: Page.Response.Redirect not working Pin
dcof9-Aug-12 18:40
dcof9-Aug-12 18:40 
AnswerRe: Page.Response.Redirect not working Pin
dipurajp10-Aug-12 2:42
dipurajp10-Aug-12 2:42 
GeneralRecursion from asp classic to asp net Pin
EnricoRS19-Aug-12 4:45
EnricoRS19-Aug-12 4:45 
AnswerRe: Recursion from asp classic to asp net Pin
Wes Aday9-Aug-12 5:54
professionalWes Aday9-Aug-12 5:54 
GeneralRe: Recursion from asp classic to asp net Pin
EnricoRS19-Aug-12 9:00
EnricoRS19-Aug-12 9:00 
AnswerRe: Recursion from asp classic to asp net Pin
jkirkerx9-Aug-12 8:19
professionaljkirkerx9-Aug-12 8:19 
GeneralRe: Recursion from asp classic to asp net Pin
EnricoRS19-Aug-12 9:01
EnricoRS19-Aug-12 9:01 
GeneralThis is how I would of wrote it, Pin
jkirkerx10-Aug-12 7:04
professionaljkirkerx10-Aug-12 7:04 
This is more along the lines of asp.net, in pure form. I don't know what the outside of the haystack looks like, so I have no clue where to inject the html

The use of response.write was popular in classic asp and echo in php, but I think it's poor programming practice. I don't know what the alternative is, I left asp back in 2003, and php in 2005.

Private Sub ShowMessages(ByVal iParent As Integer, ByVal pContainer As Panel)

        Dim message(3) As String

        Dim myConnectionString As String
        myConnectionString = ice5commerce.common.iCE5IniFile.GetSQLConnString()

        Dim mySelectQuery As String = "SELECT * FROM fmsg WHERE msg_parent=@Parent"
        Dim myConnection As New SqlConnection(myConnectionString)
        Dim myCommand As New SqlCommand(mySelectQuery, myConnection)

        Dim paramParent As SqlParameter
        paramParent = New SqlParameter("@Parent", SqlDbType.Int)
        paramParent.Value = iParent
        myCommand.Parameters.Add(paramParent)

        Try
            myConnection.Open()
            Dim myReader As SqlDataReader = myCommand.ExecuteReader()
            While myReader.Read()
                message(0) = myReader.GetBoolean(0).ToString                       'mID
                message(1) = myReader.GetString(1).ToString                        'mObject
                message(2) = myReader.GetString(2).ToString                        'mBody

            End While

            myReader.Close()
            myConnection.Close()
            myReader = Nothing

        Catch ex As Exception

        End Try

        myCommand = Nothing
        myConnection = Nothing

        If (message.Length > 0) Then

            Dim table_Container As Table
            table_Container = New Table
            With table_Container
                .CellPadding = 0
                .CellSpacing = 0
                .Style.Add(HtmlTextWriterStyle.Width, "100%")
                .Attributes.Add("border", "0")
            End With
            pContainer.Controls.Add(table_Container)

            Dim tr_TitleRow As TableRow
            tr_TitleRow = New TableRow
            table_Container.Controls.Add(tr_TitleRow)

            Dim td_TitleRow_Left As TableCell
            td_TitleRow_Left = New TableCell
            With td_TitleRow_Left
                .RowSpan = 2
                .Style.Add(HtmlTextWriterStyle.Width, "25%")
            End With
            tr_TitleRow.Controls.Add(td_TitleRow_Left)

            Dim img_UserLevel As UI.WebControls.Image
            img_UserLevel = New UI.WebControls.Image
            With img_UserLevel
                .ImageUrl = "~/image/dot.gif"
            End With
            td_TitleRow_Left.Controls.Add(img_UserLevel)

            Dim td_TitleRow_Right As TableCell
            td_TitleRow_Right = New TableCell
            With td_TitleRow_Right
                .Style.Add(HtmlTextWriterStyle.Width, "25%")
            End With
            tr_TitleRow.Controls.Add(td_TitleRow_Right)

            Dim tr_MessageBody As TableRow
            tr_MessageBody = New TableRow
            table_Container.Controls.Add(tr_MessageBody)

            Dim td_MessageBody As TableCell
            td_MessageBody = New TableCell
            With td_MessageBody
                .CssClass = "child-body"
                .Text = message(3)
            End With
            tr_MessageBody.Controls.Add(td_MessageBody)

        Else
            'No record was found

        End If



    End Sub

QuestionGridview formatting acts wierd when dployed in server Pin
preetham_s8-Aug-12 20:40
preetham_s8-Aug-12 20:40 
QuestionRe: Gridview formatting acts wierd when dployed in server Pin
Eddy Vluggen9-Aug-12 0:56
professionalEddy Vluggen9-Aug-12 0:56 
QuestionIssue for Quartz schedular Pin
Shirish kumar manda8-Aug-12 20:39
Shirish kumar manda8-Aug-12 20:39 
AnswerRe: Issue for Quartz schedular Pin
Eddy Vluggen9-Aug-12 0:54
professionalEddy Vluggen9-Aug-12 0:54 
Questioncms Pin
Member 93252298-Aug-12 20:10
Member 93252298-Aug-12 20:10 
SuggestionRe: cms Pin
Eddy Vluggen9-Aug-12 0:55
professionalEddy Vluggen9-Aug-12 0:55 
AnswerRe: cms Pin
Paul Conrad9-Aug-12 19:11
professionalPaul Conrad9-Aug-12 19:11 
Questionsetup hyperlink Pin
sc steinhayse8-Aug-12 8:01
sc steinhayse8-Aug-12 8:01 
AnswerRe: setup hyperlink Pin
R. Giskard Reventlov8-Aug-12 8:55
R. Giskard Reventlov8-Aug-12 8:55 
GeneralRe: setup hyperlink Pin
sc steinhayse8-Aug-12 9:31
sc steinhayse8-Aug-12 9:31 
GeneralRe: setup hyperlink Pin
R. Giskard Reventlov8-Aug-12 9:57
R. Giskard Reventlov8-Aug-12 9:57 
GeneralRe: setup hyperlink Pin
jkirkerx8-Aug-12 10:35
professionaljkirkerx8-Aug-12 10:35 
GeneralRe: setup hyperlink Pin
sc steinhayse8-Aug-12 11:05
sc steinhayse8-Aug-12 11:05 
GeneralRe: setup hyperlink Pin
jkirkerx8-Aug-12 12:14
professionaljkirkerx8-Aug-12 12:14 
GeneralRe: setup hyperlink Pin
sc steinhayse8-Aug-12 15:36
sc steinhayse8-Aug-12 15:36 
GeneralRe: setup hyperlink Pin
jkirkerx8-Aug-12 18:50
professionaljkirkerx8-Aug-12 18:50 
GeneralRe: setup hyperlink Pin
sc steinhayse9-Aug-12 3:51
sc steinhayse9-Aug-12 3:51 

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.