0

hello guys... I am trying to play a wave file in a small asp.net project. Now I want to embed HTML in asp.net so that I can use <object> tag of HTML to play the wave file. Following is the code to get row index from gridview, from the row I get file path

<script runat="server">
        void OnRowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName.Equals("Play Now"))
            {
                int index = Convert.ToInt32(e.CommandArgument); //this will get rowid from gridview        
                GridViewRow row = gridCalls.Rows[index];
                txt1.Text = row.Cells[5].Text; // second column in the sql server database
            }
        }  
    </script>

what should I do?? thnx

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Fortinbra
0

If you already know the HTML to play the wav file, you can insert a literal string containing hard coded HTML, and just concatenate your variable in containing the path to the wav file.

If you wrap the whole thing in a AJAX update panel, you can achieve an almost seamless transition here too.

0

If you already know the HTML to play the wav file, you can insert a literal string containing hard coded HTML

This is exactly what I dont know where and how to insert literal string into asp.net page.

0

In your gridview, add a literal control, then in the codebehind, set the value to being your HTML

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.