Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to reload the page in OnClick method?
Message
From
13/11/2006 11:55:04
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
ASP.NET
Miscellaneous
Thread ID:
01169184
Message ID:
01169206
Views:
7
Again I don't understand what your trying to do I assume you have some code like the following, again this is vb.net code that you can convert to c#
Private Sub mypage_load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
   If not Me.IsPostBack Then
      Me.CleanControlsValue()
   End If
... More code here.
End Sub

Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
   Me.CleanControlsValue()
End Sub
>Maybe your suggestion makes more sense, thank you. But I am clear about something. Let me describe better what I am trying to do:
>I want to have a button on the page that will clear all values in the textbox and dropdownlist controls of the page. Note that INPUT with type="reset" will not work here. So I need to reload the page and in the PAGE_LOAD method or in the method that you describe to clear the values.
>
>>Then what I think is that you don't want a page load, since you want to pass a parameter to it, it that case why do you create a method on your form and on the page load call that method and on the button click event call the same method passing the param you want.
>>looks like a more intuitive design and easy to read and maintain.
>>
>>>What is the command to put into the OnClick method of a button that will reload the page but not post it back. And at the same time I would like to "pass" a parameter to the server so that when the page is loaded I can use this parameter in the Page_Load method?
>>>
>>>Thank you in advance for your help.
Alexandre Palma
Senior Application Architect
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform