我曾在一个字符串格式生成一个表,并在人体补充
string mid = "<tr class='cart_item'>" + "<td class='product-remove'>" +
" <a href='handler.ashx?id=" + id + "' class='remove' title='Remove this item'>×</a>" +
"</td>" +
" <td class='product-thumbnail'>" +
" <a href='StoreDetails.aspx?id=" + id + "'>" +
"<img src='" + thumb + "' " +
"class='attachment-shop_thumbnail wp-post-image' alt='" + pname + "' /></a> </td>" +
" <td class='product-name'>" +
" <a href='StoreDetails.aspx?id=" + id + "'>"+pname+"</a> </td>" +
" <td class='product-price'>" +
" <span class='amount'><i class='icon-inr'></i> " + cd.packsize + "</span> </td>" +
" <td class='product-price'>" +
" <span class='amount'><i class='icon-inr'></i> " + price + "</span> </td>" +
" <td class='product-quantity'>" +
" <div class='quantity buttons_added'><input value='-' class='minus' type='button'>" +
"<input step='1' min='1' name='quantity' value='" + qty + "' title='Qty' class='input-text qty text ' id='txtqty" + cd.id+"' size='4' type='text'>" +
先在这里,我已经添加了输入type="text"
在HTML中,但现在我想补充asp.net文本框控件
"<input value='+' class='plus' type='button'></div>" +
// qty +
"</td>" +
"<td class='product-subtotal'>" +
" <span class='amount'><i class='icon-inr'></i> " + (Convert.ToDouble(price) * qty) + "</span> </td>" +
"</tr>";
// int qty = ((Dictionary<int, int>)Session["cart"])[id];
cartInfo.InnerHtml += mid;