[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1300
  • Last Modified:

c# asp.net- forcing page load

Hi,
i have an asp page and a web user control. in the web user control I want to force the asp page to reload after an action has happened , how can I do this?

I want to force" protected void Page_Init(object sender, EventArgs e)" in TimesheetDay.aspx.cs to run from a method in the EntryTimesheetControl.ascx.cs

Thanks
0
CharlieDev
Asked:
CharlieDev
3 Solutions
 
JuanCarnigliaCommented:
You want to Submit the page (actually, the form) from the Client Side?

   - Use __DoPostBack(); (http://aspalliance.com/895_Understanding_the_JavaScript___doPostBack_Function.all).

Greetings.
0
 
copyPasteGhostCommented:
why don't you just redirect to the same page.

Response.Redirect("Mypage.aspx");

This will force the page to be reloaded?

Ghost
0
 
OBonioCommented:
A Response.Redirect or a Server.Transfer would do it.
0
 
JuanCarnigliaCommented:
Response.Redirect is not the same as Server.Transfer.

See this link:

http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=15

Greetings
0
 
CharlieDevAuthor Commented:
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now