How do you refresh web forms?

  • Thread starter Thread starter Jax
  • Start date Start date
J

Jax

I'm kind of used to the windows forms make a change then type down the good
ol' this.refresh().
But in web forms i dont seem to have that choice no refresh, update or
anything that sounds vaguely like it. Surely i dont need a brand new webform
to display a slight change in the layout or appearance of the form.
What exactly is the command i'm looking for?
Thanks for any help given

Jax
 
In a form with a simple button called m_Button, you can add the
following event handler:

private void m_Button_Click(object sender, EventArgs e)
{
m_Button.Location = new Point
(m_Button.Location.X,m_Button.Location.Y + 5);
}

This moves the button down 5 pixels every time you press it. There's no
need for an explicit refresh. The button just does it.

Regards,

Jasper Kent
 
Jasper:

I'm not following you. The button fires a postback by default when you
press it which effectively refreshes the page doesn't it?
 
Is there a way of manually triggering the postback command?
If so will the page load event be called again, if so where am i supposed to
initialiaze my variables? I am lost without my constructor.
Thanks for any help

jax
 
I just got all the answers i need.
Thanks to everyone that chipped in with advice.
Well on my way to making some decent progress now.
Many thanks

jax
 
Could you post your solution, 'cause I'm also having troubles with page
refreshing?
 
Back
Top