I enjoy writing validation functions in my controller that modify the ModelState if the validation fails. For example:
private bool ValidateMoney(string raw, string name, decimal min, decimal max) {
try {
var dec = Convert.ToDecimal(raw);
if (dec < min) {
throw new ArgumentOutOfRangeException(name + " mu...
I am working on an ASP.NET MVC application which has a model for a business, linked to another model (business trading hours) in a one-to-many relationship.
When creating this entity we have a form where we would like to provide a fixed set of the BusinessTradingHours entities, so I have used something like the following (kind of what I...
We want to integrate webmail with our current application. At present I need to sign in to my existing application. As soon as it is done, I am asked for the webmail credentials. Once the web mail credentials are entered, the user gets access to webmail where I get 3 options in form of "Horde", "Squirrel Mail" and "Round Cube Webmail".
...
I remember reading somewhere that you can dynamically load a font into a user's computer so that you can include any font you want in a website. Is this possible - is my memory playing tricks on me?
...
hi, i m having html page with two fields username and password. from this page i provide those authentication and making login to yahoomail.. is it possible?? if so, how i can do??
...
Looking for guidance on how UI design differs for multitenant applications. Pointers to whitepapers and blog entries greatly appreciated.
...
As a professional web designer, what are the essential techniques?
In my opinion, these are the must-learns.
XHTML
CSS
JavaScript
Script language like PHP, Perl, and Python
But however, learning these and skills using these languages may only produce well-written codes, as a skilled C/C++ programmer does. The layout of a page, colou...
I am trying to use C# to access the content of a webpage. For example, I want to grab the text of the body of google homepage.
I know this is doable in C# with its web browser control. But I couldn't find a good, simple example of doing it. All the resources I found online involve creating Forms and GUI, which I don't need, I just need...
I like Stack Overflow's URLs - specifically the forms:
/questions/{Id}/{Title}
/users/{Id}/{Name}
It's great because as the title of the question changes, the search engines will key in to the new URL but all the old URLs will still work.
Jeff mentioned in one of the podcasts - at the time the Flair feature was being announced - tha...
Our company frequently issues important notices via e-mail as do many other companies do I'm sure. Our management team has turned to us to see if there is any way of knowing when a user reads this important information. I realize forcing a read receipt via e-mail is not reliable at all, so we are trying to explore other options availab...
As I found out today, it looks like YouTube is going to stop supporting IE6 pretty soon.
This begs the question, should we, as applications builders, be the ones that are helping our users to get a better Internet experience?
Should we, like Google, provide messages to users with outdated browsers?
Should we be explaining to them wh...
I have notice that stackoverflow.com does not have file extensions on their pages. How would I do this with an aspx web site?
...
Hi,
I have found that I often have to implement some sort of a scheduler in the applications I develop. The applications can range from simple maintenance tasks to fairly complex.
So far my approach has been to set up cron jobs that essentially do batch processing of queued commands. For example, I have cron invoking a script (I am wor...
I was recently tasked to,
"Test every scenario you can think of and try to break the component"
What might be sensible in 'everything' when the application is a website?
NOTE: This particular site is ASP.NET with MS-SQL, however, I would like to know what would be covered in general as well. Thank you all for the great responses!
...
How should one split up the controllers in an ASP.NET MVC site? For example, the default project has a HomeController and an AccountController. Should there be one controller for each section of the site, or something else?
I'm learning how to use the MVC framework, and any help would be appreciated.
...
Hi, I'm having some trouble with IE6 and jQuery UI. I have a popup dialog (modal, if it matters), that displays a "yes/no" dialog to the user with some information. In order to facilitate this, I build the dialog with autoOpen = false, and then I call $('#popup').show() later on as needed, in response to various different events. Now, in...
What is the correct code to create a link with heading 1 according to web standards?
is it
< h1>< a href="http://stackoverflow.com"> stackoverflow < /a>< /h1>
or
< a href="http://stackoverflow.com">< h1> stackoverflow < /h1>< /a>
Thanks
...
I have a client who owns a business with a handful of employees. He has a product website that has several hundred static product pages that are updated periodically via FTP.
We want to change this to a data-driven website, but the database (which will be hosted at an ISP) will have to be updated from data on my client's servers.
Ho...
How to control a running text? This is a user generated content, where user used to give with out giving space to the text. for example:
abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefgh
This goes beyond the specific block. Is there is a way to wrap the text? how can i control it and i also want that to be worked...
I'd like to be able to give our users an option to create a desktop shortcut to our web site. I've done some research and found a number of articles using ActiveX to access the Shell API for Windows to perform this activity, but I'm curious as to whether there is a way to do it that is built into the browser that I might be missing tha...