Refresh UI

A

Angel

I have created a CustomUserControl.
The user control has few LinkButtons in it.
I want to do something within LinkButtonClick event and then update page.
The problem is that when this event is fired the PageLoad has happened and
it is too late for changing interface.
I want to force render page again when I am finished with event.

Following code works fine, but within component I do not know which is the
current page so I cannot redirect it to it.

private void btnLinkButton_Click(object sender, System.EventArgs e)
{
if (sender != null)
{
//Update current selection singleton
UpadateState(((sender as LinkButton).TabIndex);
//this changes appearance current link button
MarkAsSelected((sender as LinkButton))

// code here to force page redraw in browser
Response.Redirect("Default.aspx");
}
}

Is there some other way to achieve Page Update after "LinkButtonclick event"
Thanks
 
T

Thomas Dodds

PAGE.toString() will give you the current class name (codebehine) - if you
have the classname corresonding to your page then you can 'build' the page
name and pass it to the usercontrol for redirection when needed ...

"The problem is that when this event is fired the PageLoad has happened and
it is too late for changing interface" - i don't follow, I have hidden
labels on a page ... the user clicks a Save button - if successfull I set
the label.visible=true and that all happens after the page_load with out
incident ... i don't follow what you are asking ...
 
T

TPS

Angel,

I have the same issue that I am dealing with. If you find a solution please
let me know.
TPS.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,121
Latest member
LowellMcGu
Top