Middletone
Middletone

Reputation: 4270

How do I force a full postback from codebehind?

I'd like to programmatically force a full page postback to occur after an event is fired by one of the child controls. I can't add any triggers to make this work so it will have to be done via code. Thanks.

Upvotes: 3

Views: 3638

Answers (2)

Mister Cook
Mister Cook

Reputation: 1602

If you mean a client side event then setup OnClientClick to call what is returned by the following after your other client side functionality:

Page.ClientScript.GetPostBackEventReference(control, "")

(It will be something like __dopostback)

Upvotes: 0

RickNZ
RickNZ

Reputation: 18652

Sorry, don't understand. By the time an event in codebehind is running, a postback has already happened.

Upvotes: 2

Related Questions