tushar.capoor 0 Newbie Poster

Hi guyzzzz,,,

I m Building HTML Script in .cs Page with sum Dataset Value.....

But i have an button generated runtime named Cancel & onclick i need to call a javascript function But I am not able to generate String Proper...Can u help me...

sqTsc.Append("<html><head><title>BOTH APPOINTMENT'S</title>");
            sqTsc.Append("<style type=text/css>.style1{font-family: Verdana, Helvetica, sans-serif;font-size:1px;}</style>");
            sqTsc.Append("</head>");
            sqTsc.Append("<body style ='text-align :center'>");
            sqTsc.Append("<table bordercolor='BLACK' STYLE='border-collapse: collapse' border=1>");
            sqTsc.Append("<tr bgcolor='Silver'><td align='center'><strong>START TIME</strong></td>");
            sqTsc.Append("<td align='center'><strong>END TIME</strong></td>");
            sqTsc.Append("<td align='center'><strong>LOCATION</strong></td>");
            sqTsc.Append("<td align='center'><strong>Patient Name</strong></td>");
            sqTsc.Append("<td align='center'><strong>Mobile</strong></td>");
            sqTsc.Append("<td align='center'><strong></strong></td></tr>");

            foreach (DataRow DR in DS.Tables[0].Rows)
            {
                sqTsc.Append("<tr><td align='center'>" + CApp.GetTimeInAMPM(DR["Start Time"].ToString()) + "</td>");
                sqTsc.Append("<td align='center'>" + CApp.GetTimeInAMPM(DR["End Time"].ToString()) + "</td>");
                sqTsc.Append("<td align='center'>" + DR["Location"].ToString() + "</td>");
                sqTsc.Append("<td align='center'>" + DR["Patient Name"].ToString() + "</td>");
                sqTsc.Append("<td align='center'>" + DR["Mobile"].ToString() + "</td>");
                if (DR["Patient Name"].ToString() != "")
                {

                    Str= "'" + txtAptDate.Text.ToString() + "','" + txtDoc.Text.ToString() + "','" + DR["Location"].ToString() + "','" + CApp.GetTimeInAMPM(DR["Start Time"].ToString()) + "','" + CApp.GetTimeInAMPM(DR["End Time"].ToString()) + "','" + DR["Patient Name"].ToString() + "','" + DR["Mobile"].ToString() + "','" + DR["Job ID"].ToString() + "'";

IN the ABOVE string i m getting sum Error at the time of Click this Button.....
                    sqTsc.Append("<td align='center'><input id='Button1' type='button' value='Cancel' onclick= 'javascript:GetRowValue(" + Str + "'); /></td></tr>");
                }
                else
                {
                    sqTsc.Append("<td align='center'></td>");
                }
            }
            sqTsc.Append("</table></body><html>");
            DS.Dispose();
            MyReport = sqTsc.ToString();
            Label1.Text = MyReport;