4月 01, 2014

設計換行和超聯結

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim Label1 As Label = FormView1.FindControl("Label1")
        'Dim b As String = vbNewLine
        'Replace(a.Text, Chr(10), "<br />")
        If Label1 IsNot Nothing Then

            Label1.Text = Replace(Label1.Text, vbNewLine, "<br />")

        End If

        ads_count.Update()

    End Sub

    

    Protected Sub HyperLink2_PreRender(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim a As HyperLink = FormView1.FindControl("HyperLink2")
        'Server.Transfer("./upload/" + a.Text)
        'Response.Redirect("./upload/" + a.Text)
        Dim b As String = "./upload/" + a.Text

        a.NavigateUrl = b

    End Sub

沒有留言: