I have code from an old project which I am changing it to a new version, In one page, we have a Repeater control and I am not able to understand the code, Especially the e.commandname in the c# code. Please help me in understanding it. Where are these command
names(Add row,update database...) coming from in the c# code.
Firstly understand visually what output is coming and what you need to implement into new version and Dont use the above code because its 1 tier architecture,
try to implement into 3 tier architecture, then above code will be easy to develop. Thank you
The e.commandName's equate to the CommandName = "..." in the LinkButtons in your Repeater. I didn't see any button that would use the "AddRow" code, though.
To better understand your code, run it in Debug mode and step though your code line by line. Set a BreakPoint on the if (e.CommandName == "AddRow") line in the Repeater1_ItemComman routine and go from there.
Member
168 Points
497 Posts
need to know how this repeater is working...Mainly the e.commandName
Oct 27, 2016 09:40 AM|acmedeepak|LINK
I have code from an old project which I am changing it to a new version, In one page, we have a Repeater control and I am not able to understand the code, Especially the e.commandname in the c# code. Please help me in understanding it. Where are these command names(Add row,update database...) coming from in the c# code.
Please find my aspx page code:
And my .aspx.cs page is:
Please explain me what these command names are and how can I understand this repeater controls operations...
Thanks,
Deepak
Member
235 Points
574 Posts
Re: need to know how this repeater is working...Mainly the e.commandName
Oct 27, 2016 11:13 AM|mazhar khan india|LINK
Dear acmedeepak,
Firstly understand visually what output is coming and what you need to implement into new version and Dont use the above code because its 1 tier architecture,
try to implement into 3 tier architecture, then above code will be easy to develop. Thank you
Star
11749 Points
2997 Posts
Re: need to know how this repeater is working...Mainly the e.commandName
Oct 28, 2016 12:02 PM|paindaasp|LINK
The e.commandName's equate to the CommandName = "..." in the LinkButtons in your Repeater. I didn't see any button that would use the "AddRow" code, though.
To better understand your code, run it in Debug mode and step though your code line by line. Set a BreakPoint on the if (e.CommandName == "AddRow") line in the Repeater1_ItemComman routine and go from there.