This code doesn't make any sense at all:
thisRow += "<table><tbody><tr><td align=\"right\" nowrap=\"\"><input id='txtAmt' runat=\"server\" type='text' MaxLength='18' Style='text-align: right; Width:140px'/></td></tr></tbody></table>";
The
input
HTML tag has an attribute
runat="server"
, but this attribute only makes sense to the part of the compiler which compiles the markup inside the
.aspx
files. Your HTML code is being constructed in the code behind file and will most probably be sent back to the client's browser. The compiler will never see this tag since it's not in an aspx markup file. Thus there won't be a txtAmt object available in the code behind.
The next thing is that you haven't properly escaped the double quotes that are supposed to be in the string you're assembling.
Best Regards,
—MRB