I've been banging my head against a wall for 2 days on this - what I assumed would be simple - bit of code.
All I'm trying to do is create a button that adds a new row to a table. Essentially:
<asp:table runat="server" id="table1"><asp:tablerow><asp:tablecell /><asp:tablecell /><asp:tablecell><asp:button runat="server" id="btnAddRow" onclick="btnAddRow_Click"></asp:tablerow> </asp:table>
I'm really not sure what the btnAddRow_Click event should look like. I've tried to do this with Javascript (of which I do not know any at all, I just tried using some code I found online here:
http://viralpatel.ne...javascript.html
But it choked on it. Presumably because I'm trying to create this within an asp.net web form using a master page. I tried putting the code in the PreRender event, but it just wouldn't work.
The SR dev at my work told me I should be using a ListView - so that's the approach I'm taking now... But all the books & online help I can find with a ListView control requires data binding (of which I do not need, or want), and I can't figure out how to manually add elements to the ListView using ListView.InsertItem...
Getting very frustrated, and I KNOW I'm making dumb mistakes & poor programming choices here. But I'm self taught and have very little understanding of these functions. You'd think 4 programming books would help. But it seems they don't.

New Topic/Question
Reply




MultiQuote







|