|
Ok this is a strange one and I'm at the end of my rope.
I am using delegates to cause an update event to fire on a aspx page when a button is clicked on an embedded user control.
The problem I am having is:
When ever I make a layout change in design view on the page, the line of code under initializeComponent that ties the delegate to the method that handles it gets erased and I have to rewrite it.
Has anyone ever come accross this problem and found a way to solve it.
TIA -John
|
|
|
hi,
This kind of problem occures when the refernces are not properly added, as u said u used the embeded user control so chek out all the required dll's are there in ur project.
all the best.
|
|
|
I've seen this a lot, and never found a good reason for it. I've started writing my own method/function for assigning delegates, and using it in Page_Load. This way I stay out of the VS.NET authored/controlled "region". It works, but I'm not satisfied that I fully understand the "why" of the problem. It's too easy to call it a VS.NET bug. Let me know if you learn anything new.
I will typically assign all like events, "click" for example, the same method, and use the sender/eventargs references to figure out which one. It just seems tidier to me to have a single "something_clicked" method to maintain.
|
|
|
|
|
|
|
|
|
// |