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

    Mr. Ramasamy.N thanks to u... but.........

    i use html tage in asp.net page.

    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



    i click LinkButton
    <asp:LinkButton runat=""server"" > " + ds.Tables(0).Rows(i).Item("level_name") + "</asp:LinkButton> . this was write in aspx.vb page.

    i want buttion click event.
    how is i get for list box fill in the click event.

    now i used input buttion. this butiton is postback event is workded. but didnot work function.
    str += "<td class=border><input type=""submit"" onClick=""getfilename();"" id=""btn"" runat=""server"" value= " & (i + 1).ToString & " > </td>

    please help me.
  • #212957
    If you want to call javascript function

    write code between <head></head>
    <script language="javascript" type="text/javascript">

    function getfilename()
    {



    }

    </script>

    and use <input type="button" onclick="getfilename()">


    (or)
    if you want to use code behind

    use <asp:Button OnClick="getfilename" >


    protected void getfilename(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.