Thanks for the quick response Curt. My situition is that I have a datagrid
on a page and a composite control made up of a calandar control and a text
box. When the user selects a new date I need the datagrid to update based
on the new selected date.
When the processing begins the page load is fired and then my composite
control is fired so I can't use the ispostback because the page is loaded
before my new date is selected. That is why I put the databind method for
the datagrid in the prerender so the datagrid will update after the date is
selected in the composite control.
I have two other buttons on the page that cause postback and the datagrid is
redrawn in the prerender method which is unnecessary for my purposes.
So if possible I don't want the code in prerender to execute if either of
these two buttons are presses.
Is there another way to get my datagrid to be redrawn/binded after the
composite control is executed?
Thanks
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:eA*************@TK2MSFTNGP09.phx.gbl...
Could you just to a
if(!IsPostBack){}
Or do you have to do the redener with some buttons? If so just put the
call to do this in the buttons you need it to, it'll be easier.
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Brian Shannon" <bs******@lbrspec.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... How can I tell the name of the button causing the post. I have some
code in page prerender and I don't want the code to execute if a certain button
causes the post since it would be an unnecessary trip to the server and
a hit on the DB.
If button <> btnTime caused post then
Execute Code
End if
Thanks