Page refresh (F5) gives multiple/repeated text in control

K

Kanchan

I have a webpart in Asp.Net which displays simple text message. It's
working fine on normal page load.The problem occurs if someone hits F5
several times, then it renders repeated text messages in the control.
Following is the code snippet:
protected override void Render(HtmlTextWriter writer)
{
try
{
writer.Write("Hello world");
//some code...
}
catch(Exception e)
{
//some code...
}
}
When I debugged the code above, it was found to hit the Render() multiple
times. Please advice?
 

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
474,262
Messages
2,571,059
Members
48,769
Latest member
Clifft

Latest Threads

Top