force reload of aspx page from silverlight xaml - asp.net

I've a Silverlight application that is called from a asp .net project. I have a link in the silverlight project that brings the user back to the asp.net project. I do not want this to happen in a new window.
At the moment, it returns me to the cached page. I want to force a reload of it.
Currently onclick event of the link invokes the following code:
HtmlPage.Window.Navigate(new Uri("http://ipaddress/menu.aspx"));
Any suggestions on how I could enforce menu.aspx to reload when called?
I found a solution..
SOLUTION
HtmlPage.Window.Navigate(new Uri("http://ipaddress/menu.aspx?"));
This results in the page being reloaded....

Try using:
HtmlPage.Document.Submit()
It should work if your .aspx target page you wish to reload is the current page.

Related

How to open specific web page in ASP.net that I'm working on or find pages that referring it in Visual Studio 2017

I've edited an ascx.cs page which I thought was relevant. When I ran the service to debug that code it wasn't the right place - The breakpoint didn't stop the service.
I know how to find the right page to edit but now I want to see what did I edit.
How can I open the page or find which pages are referring to it so I could check it also?
Have you "set as startup" that project already ? then try setting that page aspx.cs as "startup page".
After setting above both , your project will start that same projects same page that you have set up as startup.
Alternatively you can type link to that manually in address bar to get there.
While trying to set it as startup page I've found out it ascx and not aspx file. So if You want I wanted to see the edits I would need to load that page as asp controller.

Using devexpress HtmlEditor control has DXR.axd throwing 404

I am using a dev express control: ASPxHtmlEditor version 10.1. I am trying to create a simple that only has this control. Unfortunately the control does not render with any of its styles or images loaded. This happens over 20 times. The control does not have any of its styles and all of its images do not load on the control.
I am getting 404 exceptions similar to: "Failed to load source http://localhost:11238/DXR.axd?r=5_0"
The cause of this issue is that the web.config file did not contain our http handler registration. So, such requests were not properly handled and scripts and images did not come to the client. Once you open the page in the designer, the http handler was registered and the problem disappeared :)
The solution was to restart my machine and open the page the control was on in design mode to have it create all the controls it needs to render properly.

Calling web service asynchronously still hangs application

I have an aspx page with three input buttons.
The first button, using javascript/ajax, fires off a call to an IHttpAsyncHandler.
The Handler calls a web service on another server (which generates a report and returns the path to the report file). In the ajax callback, XmlHttp.responseText returns the proper path and a window.open(path) call opens the report, no problem.
The other two buttons open new windows to other aspx pages on the current site.
The problem is, after I click the first button, clicking the other two buttons do not give me the aspx pages until after the report is displayed. Blank windows do pop up, but nothing is rendered until the report is done.
What causes that hang time? I thought calling the report using ajax and an Async handler would not interfere with popping up other aspx pages.
Other attempts:
1. creating a reportGenCompletedEventHandler in the main aspx and calling the service using reportGenAsync(...)
2. calling (in the main aspx)
AddOnPreRenderCompleteAsync(New BeginEventHandler(...),New EndEventHandler(...)
3. calling (in the main aspx)
Page.RegisterAsyncTask(New PageAsyncTask(...))
Page.ExecuteRegisteredAsyncTasks()
4. same as above, creating a separate AsyncHandler, but also creating a separate thread.
Obviously, I'm missing something here. Is it possible to call a web service elsewhere and still have full control of your app?
Thanks
Are the pages you're trying to hit on the same web host? If so, I'm guessing you've hit the "Max 2 concurrent connections to the same host" limit.
The link here on asp.net describes how IE8 lets you go beyond that.

Silverlight in aspx page not loading

I have developed a simple Silverlight control. I created this by using the Silverlight application project template in VS 2008, adding a test page to my existing website.
Now, my control works perfectly in the auto-generated aspx, where I have now got it functioning as required. However, when I try to put the control in a new page it does not load. Debugging suggests that the code is all executing, however the UI I expect to see simply isn't appearing.
I tried this initially in a content page using the correct master page for my site layout, and then just in a standard ASPX which doesn't use MPs...same problem.
Has anyone else experienced anything similar? Am I missing something simple!?
So frustrating, any help appreciated!
You can use Firebug or Internet Explorer's developer toolbar (and Fiddler) to see if the xap file is being requested and the rendered object tag has the proper size. If using the control check for any JavaScript errors.
Right-click the region where the Silverlight control should be to see if you get a Silverlight options prompt. That will tell you if the problem is in the loading of your Silverlight object into the page, or after the Silverlight plugin has loaded.

Problem using the ASP.NET FileUpload control in an UpdatePanel?

I'm running into an issue where I have a FileUpload control in an UpdatePanel. When I attempt to save changes and upload the file, no file is found. If I remove the UpdatePanel everything seems to work fine.
Any ideas why this might be happening? And is there a work-around?
To upload a file you need to perform a full ASP.NET page postback, it does not operate over the partial postback method.
You'll need to register the button which "uploads" your file as a PostBackTrigger of the UpdatePanel's triggers.
There are lots of free (and non-free) AJAX file upload solutions, or you can easily create one, it's just a matter of putting your file upload control within an iframe and submitting the iframe page back to the server. It isn't really ajax, but it gives a visual impression of AJAX.

Resources