I set "maintainScrollPositionOnPostBack=true" in my web.config file for the shake of requirement. Everything is ok, but the problem is this global setting ignore my control.focus() property.
Eg:
myLable.focus();
myLable is not get focused. How can I get focus over controls regardless of "maintainScrollPositionOnPostBack" property? any help would be greatly appreciated...!!!
set MaintainScrollPositionOnPostBack=false; just before where you want to use focus with your label. This article has detailed discussion how it works underneath How MaintainScrollPositionOnPostback works
maintainScrollPositionOnPostBack relies on browser config entries in the Web.Config which are no longer supported or recommended by Microsoft - as it is, the versions of the browsers it supports are antiquated.
Use jQuery to achieve this effect, plus it's cross-browser friendly.
FYI: Here's another was to handle this:
http://www.kodergurl.com/2010/08/maintain-scroll-position-on-post-back.html
Related
I'm currently using Bootstrap 4 and FontAwesome on my website. I'm working on ADA compliance now.
The crazy thing is that it seems that every HTML tag that uses FontAwesome somehow gets aria-hidden="true" added to it. Is this by default? How do I prevent this from occurring?
I've looked through to see if I can find that being added on any JavaScript files, but I'm not seeing anything.
It's fine that the tags get it, but not the anchor tags.
If you're using the CDN, it's possible that the auto-accessibility option is enabled, which is designed to automatically inject the aria-hidden tags for you.
https://cdn.fontawesome.com/help#qa-autoa11y
If enabled as a feature in your embed code, Font Awesome CDN will try
to identify [accessibility scenarios] in your UI as well as provide the
modern and proper syntax assistive technologies recognize. For icons
that have semantic or interactive meaning, this means you'll need to
provide a proper text alternative to be used.
Log into your Font Awesome kit, choose the Settings tab, and confirm that the checkbox for Auto-Accessibility is unchecked under the Features section.
I've a problem with serialization both in silverlight and asp.net.
I've added this line to my web.config to set the culture of my web application:
<globalization uiCulture="fr-CA" culture="fr-CA"/>
Problem: when my computer is set to another culture for example en-UK, my application is taking that culture instead of the one i set in the web.config.
Your site might be honoring the browser's stated language preference.
Check the Language settings in the browser, and try setting enableClientBasedCulture in your web.config to false, per this MSDN article.
Also worth making sure you try other basic troubleshooting steps, like resetting IIS (assuming you're not using the built-in Visual Studio development web server).
If those steps fail, I would roll up my sleeves and try some serious debugging. It's possible something else is overriding your setting, or that ASP.NET isn't finding your .resx resource file.
Try overriding the InitializeCulture method on a page and hardcoding the language there (assuming you're using Webforms). That will also let you set a breakpoint while the page is loading and check what the UICulture is set to.
If the cultures are getting set properly, I'd look to make sure everything is set up correctly with your .resx. Those things can be a pain to get configured in my experience.
It might be a good idea to set up a simple HelloWorld demo app to try to reproduce and isolate the problem. Here's a decent walk-through so you can check your setup steps.
I have a asp.net website I made change to the css style sheet when looking at design view i can see the change have been done but when I debug it is not the same ?
After you debug press ctrl + F5 on your browser that will probably reflect your css changes
You will find more about Clear Your Browser's Cache here
Hope this helps
I suggest you use the browsers built in tools for inspecting HTML elements and then check to see if the specified CSS rule that you changed has been applied. My guess is that your browser cached the previous look of the page but I might be off on that. In any case 1st check if the CSS change was actually applied then proceed from there...
I need to display HTML in my silverlight application and cannot find a way of doing it. I cannot use the web browser control as it needs to be able to run in or out of a browser.
Does anyone know of a good way to do this, because all I can think of doing at the moment is running replace methods on the text to just replace the tags with C# equivalents eg(<br /> to \n).
The way I do it is to check if the application is running inside the browser and change the means of display accordingly. If running inside the browser, I overlay the application with an IFrame, as I describe in this article: http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-6.aspx. Otherwise, I use the WebBrowser control. I have a control which does this all for you in the source code that accompanies my book, which is downloadable from the Apress website here: http://www.apress.com/book/downloadfile/4638.
Hope this helps...
Chris
I believe what you are looking for is HTML Bridge.
Edit I'm am actually now unsure if you'll still have access to javascript if you're running this OOB. I'm going to look into this some more and will further update. I'll still leave the answer up though for reference.
Second Edit Here is what I've found. HTML Bridge is disabled when you run silverlight out of browser. This disables access to the HTML DOM as well as Javascript. However, according to a comment on this site:
HTML Bridge is not available when you first install a OOB app. But you CAN force it if you modify the index.html in the folder where the app is installed just adding the enablehtmlaccess parameter.
It works!
You can even create dynamic HTML elements using the well-known methods of the HtmlPage class. You can even open a new browser window with the Navigate() method and its "_blank" parameter.
Keep in mind this information was posted about SL 3. Its possible that this may have changed, but I doubt it. So it seems that what you may want to do is build a script into the startup of your SL app that detects whether or not your app is running out of browser. If it is then you may want to have some script to call that can modify this file for you.
There recently was a similar question.
I posted a link there to an implementation that parses and displays HTML inline in Silverlight. Of course, it will work only with simple HTML, but maybe you can expand it to your needs.
This is a bit special:
I'm loading some HTML in string form into the WebBrowser control via the DocumentText property.
Now when I print the page with a PDF printer (Bullzip PDF Printer in my case) it always takes the URL as document name which is "about:blank".
Is there any way to change this to another value by either changing the URL property (it's read-only) or by changing the print behaviour to use another text rather than the URL as filename?
There are a couple of options that I am aware of though my knowledge on this subject is a bit dated.
The first is to change the computer settings in Internet Options. Regardless of whether this is done by hand or through a registry change script, it is simple for the developer, but obviously not the best approach from the deployment or compatibility angles.
The next approach is to develop a custom print template. This is not fun, but is probably the most professional approach. As much as I would love to include all of the information needed on this approach in this post, it is too much to cover. Here is a good overview and good luck Googling from there.
My experience with this involved printing from the MS WebControl component used in a .NET 1.1 Winforms application to the Web Super Goo PDF converter component. Your mileage may vary.
You can change the header and footer such that the URL property is not printed.
Try to Navigate to a URL, then cancel that via DWebBrowserEvents::BeforeNavigate