You must Sign In to post a response.
  • Category: ASP.NET

    please help me very argunt....

    i want (serverside html tage image butiton) onClick event to
    call our asp.net function

    Private Function RefreshGridView1()
    Dim ds As DataSet = getCurrentTasklevel(eID.Value)
    Dim str As String = ""
    Dim strLevelHeader As String = _fs.getLevelHeader()
    Dim lCount As Integer = _Utility.sqlScalar("select count(level_id) from m_level")
    str += "<table style=""width:100%"" cellpadding=5 cellspacing=0>"
    str += "<tr class=bRowstyle>"
    str += "<th rowspan=2 >S.No</th>"
    str += "<th rowspan=2 >Task File ID</th>"
    str += "<th rowspan=2 >Part No</th>"
    str += "<th rowspan=2 >Start Time</th>"
    str += "<th rowspan=2 >End Time</th>"
    str += "<th rowspan=2 >Alloted Level</th>"
    str += "<th colspan=" & lCount & " >Status</th>"
    str += "<th rowspan=2 >Status</th>"
    str += "</tr>"
    str += "<tr class=bRowstyle>"
    str += strLevelHeader
    str += "</tr>"
    If ds.Tables(0).Rows.Count = 0 Then
    str += "<tr><td style=""text-align:center"" colspan=50>"
    str += "No files available for work"
    str += "</td></tr>"
    End If
    Dim i As Integer
    For i = 0 To ds.Tables(0).Rows.Count - 1
    Dim _tstatus As New TaskStatus(ds.Tables(0).Rows(i).Item("task_file_id"), ds.Tables(0).Rows(i).Item("level_id"), "border")
    Dim strStatus As String = _tstatus.HtmlString
    str += "<tr class=border>"
    If _tstatus.workAllowed Then
    If _tstatus.LevelCrossed Then
    str += "<td class=border><a href=FileMergeList.aspx?task_file_id=" & ds.Tables(0).Rows(i).Item("task_file_id") & "&level_id=" & ds.Tables(0).Rows(i).Item("level_id") & "> " & (i + 1).ToString & " </a></td>"
    End If
    Else
    End If
    str += "<td class=border> " & ds.Tables(0).Rows(i).Item("task_file_id") & "</td>"
    str += "<td class=border>" & ds.Tables(0).Rows(i).Item("part_no") & "</td>"
    str += "<td class=border>" + ds.Tables(0).Rows(i).Item("start_time") + "</td>"
    str += "<td class=border>" + ds.Tables(0).Rows(i).Item("end_time") + "</td>"
    str += "<td class=border>




    ----
    <asp:LinkButton runat=""server"" > " + ds.Tables(0).Rows(i).Item("level_name") + "</asp:LinkButton>
    -----



    </td>"
    str += strStatus
    str += "<td class=border>" & ds.Tables(0).Rows(i).Item("completed") & "</td>"
    str += "</tr>"
    Next
    str += "</table>"
    divTable.InnerHtml = str
    End Function

    how is apply in asp:LinkButton.

    please help me
    advance thanks .
  • #212834
    you can use single quotation mark for inner elements inside that text string element. Like, for instance,
    <asp:LinkButton runat='server' Text='" +ds.Tables(0).Rows(i).Item("level_name") + "'></asp:LinkButton>"
    ....
    ...
    ...
    ..

    Ensure that your "divTable" is made "runat=server" option

  • #212905
    <asp:LinkButton runat='server' OnClick="lik_Click" Text='" +ds.Tables(0).Rows(i).Item("level_name") + "'></asp:LinkButton>"


    protected void Page_Load(object sender, EventArgs e)
    {


    }


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.