Issue with Dynamically created control Click_event
I have several records in my project that display in page_load event. Each record contains Dynamic button Control "submit" which has its own id created dynamically. Also has some linkbutton controls created (to display pages) in my page which is also Dynamic. I cant change that because that is how i wanted for my project.
Now the issue is:
public void Page_Load(object sender, EventArgs e)
BindData(1,5);//i want this to happen only here and not in the else statement, but thats the issue.
BindData(1, 5); //if i dont disable this, submit is working but linkbutton gives me the error "Muttiple control have same submit button id".
if i disable it, link is working, but submit is not firing its event.
//when i click the linkbutton(which is postback and pager controls eg: 1,2,3,4..) , i dont want this binding to happen, coz i already have the Binding inside its event handling function based on which link button is created. But if i disable this BindData, and while i click the "Submit" button which i have in each record, the event is not firing, because the controls are not created in page_load i guess.
So i want to check in the else statement in the page_load, whether the Dynamic link buttons are clicked? is there way to check the Dynamic buttons?
-Thanks for your time.