Delete information from textbox when there is Reload

Asked

Viewed 36 times

0

I am creating an Asp.net web page and I wanted when the site was reloaded or pressed the "F5" key all the data of the textbox to pass the "".

  • Could you explain your scenario better? Are you having any Viewstate or Postback problems?

  • I don’t know how to do it so I’m asking! I don’t even know where to start

  • But what’s happening? you fill in the fields and when refreshing the page the old values are displayed?

  • yes that’s right. the texts continue there with the values

  • You have some component that has the attribute AutoPostBack="true" ?

  • @Leandroangelo Não

Show 1 more comment

2 answers

0

How did you report that you are not using the PostBack for no operation, you can turn off the Viewstate. In the page declaration on your .aspx add the attribute EnableViewState="false".

<%@ Page EnableViewState="false" ...

0


Just put the text to "" (null) when the page Load()

Browser other questions tagged

You are not signed in. Login or sign up in order to post.