Ajax calendar control not working based on the CurrentUICulture - sharepoint-2010

I have used Ajax calendar extender in my application in which, it is deployed in sharepoint site.
I have set my regional setting for my sharepoint site as "Sweden-Swedish" also, my site has "Select language" option for the end users.
Problem is: whenever anyone choose any of the languages from "Select language" option, it will not have any impact on the ajax calendar control, instead it is showing the day and month names in "Sweden-Swedish" culture.
Immediate help is appreciated.

Ajax Control Toolkit relies on a standard ASP.NET culture detection, which is based on browser's regional settings.
If you see, that other sites are shown with Swedish culture as well, then you can force it.

Related

IIS default datetime format

We have a WCF web service returns back some xml containing a datetime value as a string. The value is first read out from a database and then appended to an xml string using .ToString().
We have a number of web servers running but this particular one is converting the datetime value to a 24 hour value, we need it has a 12 hour value but I can't figure out how to change IIS default date format. I have tried changing the regional settings and have look at the culture and ui culture values of the web service which are both set to "Invariant Language (Invariant Country)".
I think it might require a registry change. Does anyone know how to change the datetime format of a web service?
We cannot change the code at this stage so my only choice is to update the server itself.
Its running on windows server 2008.
thank you
Nevermind people I've figured it out. To change the datetime regional settings of an IIS website/webs ervice here is what you do:
First go into IIS and click on the website/web service you want to configure. On the right hand side open up .Net Globalization and change the culture and ui culture to anything other than the one you want.
Now in the control panel go into the region and language screen and change the datetime format to what you want it to be. Then on the administration tab of the region and language screen click the "Copy settings" button and tick the box "Welcome screen and system accounts". Click ok on both screens to exit region and language.
Now go back to IIS and change the culture and ui culture back to what it was before you change it. Your website/webservice should now be serving up the correct datetime format.
I think the key point here is copying the region and language settings to all system users. then changing the IIS culture settings makes IIS pickup the new settings. You might get away with not changing the culture and simply restarting the webserver or the machine after making the changes in the region and language screen but i haven't tried this.

Creating dynamic web forms in ASP.NET

My project aims to provide the end user the ability to dynamically design forms in run-time. That would be something like a simple web based IDE to design web-forms.
The end user should be able enter all the components and their respective properties of the web form at runtime.
A web form should be generated based on the components and properties defined by the user and the final form should be displayed.
Is reflections the best ways to do this? If so could you please point me an appropriate page as to how I would have to do this?
Are there other ways to implement this apart from reflections?
I tried researching on web-parts but , I came to realize that web parts was not what I intended to do with the project because I would not know any of the properties of the components in advance during compile time.
Does it have to be webforms and its controls running from server ( from System.Web.UI )?
Just to share some experience, we have a huuge codegeneration like applications, which given parameters ( which could be input like ones or the whole database depending of the case ) can generate html submiting forms to server side using jquery and/or dojo ajax features...
because we want simplicity, we decided we would not generate server side controls dinamicaly
the bottom line is, I don't know your requirement, but maybe you want to do something similar.

prevent duplicate site / page / layouts / templates / webparts, possible

We have a sharepoint environment with many sites (and sometimes many site collections). Each site (or site collection) has the same default page with some custom webparts that use sitecolumn values (for example a projectcode or clientcode) to show information from external systems. (for each project we have to create a separate site (or site collection) because of other reasons)
What is the best approach to minimize duplication? The dynamic parts of the page are stored in site columns. When we add a new webpart, ideally the default page every site/page should show the new webpart without spreading the update to the individual pages
Thanks
One approach you may want to take is to use the web part as a wrapper for a user control. The user control does the heavy lifting on the site. Once the web part is included on your pages, the user control should be able to tell which site it is being executed on and pull the necessary dynamic data from your site columns.
When you need to make updates, you update the user control and then redeploy the solution package to the farm. Each site will pick up the change as soon as the solution is deployed.
Here is a little information about this approach:
http://msdn.microsoft.com/en-us/library/ff649867.aspx.
The above article relates to WSS 3.0, but that should give you a starting point.
An approach you may want to look at for SharePoint 2010 is a visual web part. More info can be found here: http://msdn.microsoft.com/en-us/library/ff597539.aspx.

Retrieving dynamic text from a website in vb.net (VS2008)

I want to be able to retrieve dynamic data from a web page (share prices). I started out by retrieving the html code before I realised that as it is live data, the html code will be of little use. Although I am looking to capture specific data, all i wish to do is process a webpage that I specify which will return the text off that website and not the HTML code. Basically a copy and paste of the entire page would be great..
Any ideas would be really appreciated!
'Screen Scraping' by parsing HTML is so early 2000s...what I would do is read up on Amazon's Mechnical Turk. You can develop a queued architecture where you submit urls to this Mechnical Turk service. The service would automatically distribute these bits of work to users who would then do the dirty task of copying and pasting out the valuable stock quote information you require. Users around the world would anxiously await delivery of the next URL to their Mechanical Turk inbox...pinning for the opportunity to copy/paste out another share price for your application. Sure, it might take a few minutes to update your prices, but hey, they would be HAND parsed by REAL people around the globe! Just think of the possibilities!
Well, the HTML contains the text of the website, so you "just" need to parse the HTML.
EDIT: If the data is not in the HTML but loaded dynamically, the situation is different. As I can see, you have two options:
Find out how the data is loaded (i.e. read the JavaScript on the page). If it is updated via some web service, you could query the same web service in your program.
Use a web browser to get the data and then get the dynamic HTML tree of the page. Maybe the WPF Webbrowser control can help you with this, but I'm not sure since I've never done this myself.
Is it possible to find this same data provided in a ready-to-consume format rather than scraping HTML for it? It seems like there's probably public web-services for stock quotes.
For example: A quick search for "Stock price webservice" turned up http://www.webservicex.net/stockquote.asmx; an ASMX web-service that is easy to consume in .NET.
In your Visual Studio project you should be add a reference to this service via the "Add Web Reference" command; the dialog you're given varies depending on whether your project is targeting for .NET 2.0 or .NET 3.0/3.5.
I added a reference to the service named StockPriceProxy:
Public Function GetQuote(ByVal symbol As String) As String
Using quoteService As New StockPriceProxy.StockQuote
return quoteService.GetQuote(symbol)
End Using
End Function

Localization of a DotNetNuke website

I am working on a website in dnn. I want to change the language of website or particular page. So I download the language package for spanish(es-es),chinese(zh-cn) and install them from host. Next when I changed the language of browser then the website language didn't change. Working on dnn 5.0.
Please let me know how I can use language packages in dnn website.
For initial translations and maintenance of DotNetNuke translations, I recommend the use of OmegaT. It handles resx files directly. And content (such as HTML or Blogs) can be downloaded, translated and then uploaded thanks to the APIs of DNN (drop me a note if you need the scripts).
OmegaT stores the translations in it's memory (a TMX file, which is actually some kind of XML). It also uses Google Translate and similars, and has a fast user interface which increases translation speed a lot when compared against continously waiting for DotNetNuke to handle your updated resources.
More info on OmegaT. An example of a translated site and modules: site translated from Dutch into English
You should probably ask this in the DotNetNuke forums: http://www.dotnetnuke.com/tabid/795/default.aspx.
There's one dedicated forum for questions about language packs and localization. You will probably find your answer there: http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/77/scope/threads/Default.aspx
The language packs don't always have translations for everything on the site, especially content that you added yourself. You'll need to do two things to get them working properly:
Go to Admin > Languages, and enable the languages you want to use.
Open the Language Editor and start translating. Under each resource name, you will see an edit text box for the localized value, and a read-only text box for the default value. In most cases, you'll need to translate verbatim what you see under "default value".
We had to write our own menu provider to get the menu to do this - instead of going for the resource files we went for a database solution - other reasons applied to this as well - we also built an interface for doing this - as for things like the text/html module there are some third party builds that allow you to nationalize content. Apollo comes to mind Apollo Software they have some multilanguage modules
The language packs will typically only localize text used by the core such as "Login" and "Settings". It is designed so that you can have a site in a language other than English, not so you can have multiple languages on one site. You can easily have multiple portals, each with a different language.
In order to have multiple locales on one portal you will need to use a third party module or develop your own.