VS 2010 Remove URL From Android Browser When Using AJAX?
Mar 4, 2011
Below is the code to remove the URL bar on page load.... But I'm using AJAX with some panels and once the panels change, the URL comes back. Anyone experience this and know how to get around it?
Have some problems with client side validation (using RequiredFieldValidator, RegularExpressionValidator, CustomValidator with client side validation logic). It seems that WebForm_DoPostBackWithOptions is not fired or causes unhandled exception that makes the form to do the postback regardless it's valid or not.
I tried using a ValidationSummary, hiding it if javascript is supported:
Every thing works fine on Chrome with disabled javascript on my laptop, but not on my Android phone. The problem is that on the phone Javascript is not disabled, it's enabled, and correctly hides the ValidationSummary, but does not perform client side validation for some reason that i can't understand (no developers tools on Android browser :(( ).This is very frustrating! :(
We're running a fairly large site, and a lot of our visitors have started using their Android based cellphones to visit the site. However when they try to login, we get an Event Validation error:
Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Does anyone know of a way to fix this, without disabling Event validation entirely ?
It isn't every single time they visit, but it is often enough that it's a problem.
Also we never get these on PC-based browsers (IE, FF, Chrome, Safari, Opera, etc.)
EDIT:
The page this happens on has no updatepanels, no custom __doPostback code, etc. It's pretty much vanilla with a simple LinkButton that causes the postback.
Also this error occurs on a bunch of other pages as well (Just found out about that now), so I doubt it's a lone design fault.
how to solve the AJAX POST problem on ASP NET MVC running on IIS7, basically when you use an Android 2.1 phone and load an ASP NET MVC website on IIS7, and you click on a input button that subsquently makes an AJAX call, you get on a high level, the error window shopwing Error: NETWORK_ERR: XMLHttpRequest Exception 101. I have generated a TempData variable containing some data, and when a RedirectToAction call is made to the controller, the TempData is null. am wondering if anyone has managed to solve this problem at all, and I have searched everywhere but no one seems to know the solution for it.
I tried to install Visual Studio Prof 2010 trail version in my system, but i got an error saying 'Please remove/uninstall Visual Studio 2010 load test controller' to proceed installation. i uninstalled my previous VS2008 software from system and i could not find anything like 'Remove/Uninstall Visual Studio 2010 load test controller' software in my Add/Remove Programs.
i am using Jcrop to give users the option to crop there images, i have hit a small caching problem.
if you open an image which is already on the server and crop it. my jcrop works and crops the image fine but when i reload the image the old version is displayed. i have this inside an update panel.
so is there a way of removing the browsers cache before i reload the image?
I'm looking for a way to get rid of the querystring of a page and redirect to itself but preserver the querystring data in some way. Exmaple: [URL] should redirect to [UL] Still, after the redirect, I want to be able to pick up the parameters that were originally passed. And I don't want to have [URL] in the browser's history.
What I tried so far:
* Response.Redirect(): does a proper redirect without creating browser history but I cannot preserver the parameters. * Server.Transfer: preserves the parameters but the browser's URL remains unchanged. * Create a client form on the fly and submit in "onload": works, querystring is gone, parameters are accessible through Request.Form, but creates a history entry in the browser.
The only thing I can currently think of is to store the parameters in the session, then redirect, then pick them up from there.
I have a registration page where I am saving some information. That is running successfully but when I press ctrl +F5 after registration. I get a message by browser to repeat event which is handled earlier. I have done blank all text values and to false viewstate of every control but It is saving 2 times.
The dropdownlist symbol is hided in chrome and Mozilla. But am not able to solve in explorer. How I will hide the symbol from IE9 and upadated versions of IE.
I am currently finalizing an ASP.NET web application that requires to have a page printed at the end of the process.
Currently, what I am trying to achieve via ASP.NET is to NOT display the URL at the bottom of the printed page.
From my understanding, this is controlled by the web browser. On IE 8, you can go to file, page setup and you can remove the URL from the page footer.
My problem is this web application will be used by hundreds and I would have to manually change the settings for every user on their desktop. Also, another problem is that I still want the URL to be showed on the page footer when they print their other stuff on the web. And last, even if I go on every single computer and change the settings, well the user can put the URL back on the page footer.
So is there a way for my web application to control that ? I assume that there is a registry setting, but again i'm not sure my web application will have access to everyone registry due to strict policy on the network.
Another route would be to generate the letter in a PDF document but I don't want to go that route at this very moment..
Why does the gridview put everything in a table?! Is there a way to not have the gridview generate any html what-so-ever and just use what I have in the ItemTemplate?
I'm just getting started in ASP.net and am building a site. I made a change to a style sheet to change the color of the links in my menu control on my master page. It looks great in the designer and is just the way I want it. Although, if I view default.aspx in the browser it is back to how it was before I made the change. Can anyone give me some suggestions on places to look to figure out why it isn't right in the browser?
Google Chrome is my default browser. however when i run VS 2010 it opens the page in Chrome. I want to force VS 2010 to open it in IE. how it can be done without resetting IE as my default browser ?
Our ASP.NET application allows the users to review any number of PDF forms. A simple listbox holds filenames and the forms are displayed inside a standard iFrame. The setup is simple and effective: when the user clicks on a filename, that filename is loaded into the iFrame, and shown to the user.
Users are allowed to digitally sign the forms. For appearance purposes, a bitmap of the user' signature is generated and placed in the appropriate location of the PDF form.
The bitmap file format is GIF, and the background is transparent.
We use iTextSharp for form-filling, and we also use iTextSharp to place the bitmap on the forms. Nothing special.
We can readily verify that the signature bitmap is correctly placed on the form, and that the bitmap itself is definitely transparent.
Problem 1:
After placing the bitmap of the user' signature on the form, the form is reloaded and displayed to the user (for verification) and, in most cases, the forms do not display the bitmap. Opening the PDF reveal that the bitmap has been placed and is definitely visible in Adobe Reader (9 and 10 - these are the versions available for testing).
Experimentation and quite a bit of research seems to suggest that the problem lies in caching. One of the possible solution/suggestion is to append a time-stamp or a GUID to the URL, when loading the form after applying the bitmap. In theory, this should prevent Adobe Reader from using a cached copy of the PDF form.
We have tried appending a time-stamp and/or a GUID, without any success: the forms still display without the bitmap. At the risk of repeating myself: the PDF form is correctly signed, and the bitmap is correctly placed. It is just not visible.
This problem seems common to users running the application on intranet web servers (IIS 7). The one application instance running on public web server (IIS 7) does not seem affected by this problem.
Problem 2:
As mentioned, the GIF file generated by our application has a transparent background. In almost all cases, Adobe Reader (9 and 10) seems to understand and respect the transparency of the bitmap.
In one very peculiar case (when the application is running on a Windows 7 64 bit machine with IIS 7), when the bitmap is placed on the form, it becomes opaque (complete loss of transparency).
Again, the problem seems related to Adobe Reader, because the bitmap being applied positively sports a transparent background.
I have an application including an Asp:menu. This renders perfectly in both IE and Firefox, see screenshot gf1.jpg.
Running in Chrome the rendering is bad. There is added wide space in the top menu, so the area is much wider, and thereby not correct. See gf2.jpg.
I have tried using this workaround found by surfing, but it is still the same. Can I add some additional code, that will prevent this?
Code: If Request.UserAgent.IndexOf("Chrome") > 0 Then If Request.Browser.Adapters.Count > 0 Then Request.Browser.Adapters.Clear() Response.Redirect(Page.Request.Url.AbsoluteUri) End If End If
I want it to be displayed equally in IE, Firefox and Chrome....
I defined a default error page in the ASP.Net Web Site Administration tool. The page exists in root directory. I also confirmed that it pointed to my frmErrorPage.aspx by looking in my Web.config file
Running my site locally from within visual studio, I tried to surf to a non existent page. This threw an error as it is suppose to, but did not pull up my custom error page. I get
Code: Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. ...
On PageSpeed Insights they recommend highly doing two things:
1) Leverage browser caching
Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.
2) Enable compression
Compressing resources with gzip or deflate can reduce the number of bytes sent over the network.
We are with Network solutions and believe they are using IIS 6 with regular asp.net code. Some of the images are using Amazon S3/Cloudfront.
How do we implement the above items? I see a lot for IIS 7.
I open two browser, log into the application, proceed in a few pages to store some information in the objSessionData for both browser (2 differrent session).If I close the first broswer, and now keep on going on the 2nd broswer, everything that was in session is now lost.It looks like Session 1 detroyed session 1 and session 2.I have tried to change the cookieless to TRUE and when it is set to TRUE, I do not get this problem at all.