asp linkbutton in html
-
hi..i am trying to get a asp:linkbutton in html table header linke this
~MyStringBuilder2~.AppendFormat~(~" <~th bgColor=""#f6a127""><~asp:LinkButton id=""LB1"" Text = ""Click Me"" OnClick = ""LB1_Click"" runat=""server""/~><~/th~>" + vbCrLf)(without the (~))
but i cant seem to get it.. the header is always blank/.... can someone pls tell me whats the prob??? tks "Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18 -
hi..i am trying to get a asp:linkbutton in html table header linke this
~MyStringBuilder2~.AppendFormat~(~" <~th bgColor=""#f6a127""><~asp:LinkButton id=""LB1"" Text = ""Click Me"" OnClick = ""LB1_Click"" runat=""server""/~><~/th~>" + vbCrLf)(without the (~))
but i cant seem to get it.. the header is always blank/.... can someone pls tell me whats the prob??? tks "Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18The "asp:LinkButton" tags for a LinkButton are a design-time HTML element for an ASP.NET page, and you cannot emit those tags into the HTML page and have them show up correctly; they are pre-processed by ASP.NET into the correct combination of JavaScript & HTML that will interact with the server during a post back. You can, however, dynamically add a new LinkButton to the controls collection of a container and that will render correctly. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
-
The "asp:LinkButton" tags for a LinkButton are a design-time HTML element for an ASP.NET page, and you cannot emit those tags into the HTML page and have them show up correctly; they are pre-processed by ASP.NET into the correct combination of JavaScript & HTML that will interact with the server during a post back. You can, however, dynamically add a new LinkButton to the controls collection of a container and that will render correctly. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
i did...doesnt work either... Public Class HKFilmReport Inherits System.Web.UI.Page Public WithEvents myPlaceHolder As System.Web.UI.WebControls.PlaceHolder Public WithEvents myLinkBtn As System.Web.UI.WebControls.LinkButton #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. Private Sub InitializeComponent() End Sub Protected WithEvents lblOutput As System.Web.UI.WebControls.Label Protected WithEvents imgBtnBack As System.Web.UI.WebControls.ImageButton Protected WithEvents Form1 As System.Web.UI.HtmlControls.HtmlForm Protected WithEvents lblHeading As System.Web.UI.WebControls.Label Protected WithEvents lblBy As System.Web.UI.WebControls.Label Protected WithEvents lblDate As System.Web.UI.WebControls.Label Protected initVal As Boolean Protected sortOrder As Integer Protected WithEvents ds As System.Web.UI.WebControls.LinkButton Protected WithEvents ph As System.Web.UI.WebControls.PlaceHolder 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not IsPostBack Then If Request.QueryString("action") = "sort" Then FillDataSet(1) Else FillDataSet() End If lblDate.Text = "Date : " & Date.Now lblBy.Text = "Generated by : " & Session.Item("userName") End If End Sub Private Sub FillDataSet(Optional ByVal sort As Integer = -1) Dim sqlStr As String Dim dataStr As String Dim bUsed As Boolean Dim objReport As New TETRAPAK.ReportClass Dim arrFilter As New ArrayList arrFilter = Session.Item("FilterArray") bUsed = False sqlStr = objReport.GetFields(5, Session.Item("FilterArray"), Session.Item("Filters"), Session.Item("Values"), bUsed, sort) myPlaceHolder = New PlaceHolder myLinkBtn = New LinkButton '
-
i did...doesnt work either... Public Class HKFilmReport Inherits System.Web.UI.Page Public WithEvents myPlaceHolder As System.Web.UI.WebControls.PlaceHolder Public WithEvents myLinkBtn As System.Web.UI.WebControls.LinkButton #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. Private Sub InitializeComponent() End Sub Protected WithEvents lblOutput As System.Web.UI.WebControls.Label Protected WithEvents imgBtnBack As System.Web.UI.WebControls.ImageButton Protected WithEvents Form1 As System.Web.UI.HtmlControls.HtmlForm Protected WithEvents lblHeading As System.Web.UI.WebControls.Label Protected WithEvents lblBy As System.Web.UI.WebControls.Label Protected WithEvents lblDate As System.Web.UI.WebControls.Label Protected initVal As Boolean Protected sortOrder As Integer Protected WithEvents ds As System.Web.UI.WebControls.LinkButton Protected WithEvents ph As System.Web.UI.WebControls.PlaceHolder 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not IsPostBack Then If Request.QueryString("action") = "sort" Then FillDataSet(1) Else FillDataSet() End If lblDate.Text = "Date : " & Date.Now lblBy.Text = "Generated by : " & Session.Item("userName") End If End Sub Private Sub FillDataSet(Optional ByVal sort As Integer = -1) Dim sqlStr As String Dim dataStr As String Dim bUsed As Boolean Dim objReport As New TETRAPAK.ReportClass Dim arrFilter As New ArrayList arrFilter = Session.Item("FilterArray") bUsed = False sqlStr = objReport.GetFields(5, Session.Item("FilterArray"), Session.Item("Filters"), Session.Item("Values"), bUsed, sort) myPlaceHolder = New PlaceHolder myLinkBtn = New LinkButton '
What is a TETRAPAK.ReportClass and why do you pass it myPlaceHolder as a method parameter? What does its documentation say about the allowable parameters and how those interact with the page? What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
-
What is a TETRAPAK.ReportClass and why do you pass it myPlaceHolder as a method parameter? What does its documentation say about the allowable parameters and how those interact with the page? What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
i am trying to pass the placeholder cause while makein a html page.. i can put the place holder taht i pass inside the html.. i done understand what you mean by documentation... also dont understand your whole second question..:( "Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18
-
i am trying to pass the placeholder cause while makein a html page.. i can put the place holder taht i pass inside the html.. i done understand what you mean by documentation... also dont understand your whole second question..:( "Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18
OK, here's your code:
Public Class HKFilmReport
Inherits System.Web.UI.PagePublic WithEvents myPlaceHolder As System.Web.UI.WebControls.PlaceHolder
Public WithEvents myLinkBtn As System.Web.UI.WebControls.LinkButton
' region omittedPrivate Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles MyBase.Load
If Not IsPostBack Then
If Request.QueryString("action") = "sort" Then
FillDataSet(1)
Else
FillDataSet()
End If
lblDate.Text = "Date : " & Date.Now
lblBy.Text = "Generated by : " & Session.Item("userName")
End If
End SubPrivate Sub FillDataSet(Optional ByVal sort As Integer = -1)
Dim sqlStr As String
Dim dataStr As String
Dim bUsed As Boolean
Dim objReport As New TETRAPAK.ReportClass
Dim arrFilter As New ArrayList
arrFilter = Session.Item("FilterArray")
bUsed = False
sqlStr = objReport.GetFields(5, Session.Item("FilterArray"), Session.Item("Filters"), Session.Item("Values"), bUsed, sort)myPlaceHolder = New PlaceHolder myLinkBtn = New LinkButton myLinkBtn.ID = "lnkBtn" myLinkBtn.Text = "Status(Active/Inactive)" myLinkBtn.onclick = SortNow() myPlaceHolder.ID = "plcHolder" myPlaceHolder.Controls.Add(myLinkBtn) dataStr = objReport.RetrieveData(sqlStr, 5, bUsed, myPlaceHolder) lblOutput.Text = dataStr
End Sub
End Class
What is the thing in bold? What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.