asp.net

Verify a date in JavaScript

I need to do user validation of a date field, it should be in the format yyyyMMdd and should not be more than one year in the future. How would I go about doing this? Currently I only have a crude regexp which is insufficient. function VerifyDate(source, args) { var regexp = /^([1-2]{1}[0-9]{1})\d{2}([0][1-9]|[1][0-2])([0][1-9]|[1-2...

As an ASP.NET Web Developer using Visual Studio, should I have IIS installed?

We do ASP.NET Development using Visual Studio. A discussion point we've just had is whether or not our developers should have IIS installed. With the ASP.NET Development Server you can run your web apps without IIS. Once you're happy with everything you can then deploy it to a test server running IIS and then onto Live. In my opinion,...

How do I get the correct ClientID for my ASP.NET TextBox?

I have created a a subclass of Table in my ASP.NET project which creates. The table uses a class that formats and creates TableRows and TableCells which we can call RowCreator. So MyTable calls rowCreator.CreateRow() and gets back a TableRow with a lot of goodies in it. In this TableRow there is a TextBox which is supposed to trigger a ...

Calendar (date-picker) control for mobile devices in ASP.Net

Hi, I'm looking for a calendar control (aka date-picker) that works on mobile devices. The problem is most devices are w/o JavaScript, or with poor JavaScript support. ASP.Net's built-in control uses JavaScript to do post-back. ASP.Net has a mobile calendar control, but it isn't fully localizable (on low end devices where it displays a...

how can we integrate jquery autocomplete using asp.net, webservie and sql database

hi i am trying to implement the code given for "jQuery Autocomplete and ASP.NET" but unable to integrate it cause you are using subsonic to query database so can you tell me how to query sqldatabase and bind the query result to the plugin from webservice in asp.net using C#. please its urgent. ...

Add ons in a compiled language

We are developing a CMS in ASP.NET. We love the idea of add-ons (like in Wordpress, where any developer can add a menu button or a widget) and would like to enable developers to do the same with our system. However I think that the fact that C# is a compiled language is an obstacle in the way of add-ons. Am I right? Or is there a w...

ASP.NET User Profile vs using Cookies

I think, in almost all cases user preference data may be stored in a cookie with (almost) equally good results as when the User Profile API is used. Disadvantages of using cookies (for authenticated users) seem to be that a cookie can be deleted or time-out, in which case the user preference data will be lost. For anonymous users, if the...

How do I disable downlevel rendering in ASP.NET?

How do I disable downlevel rendering of my ASP.NET 2.0 site? I have a single master-page that all the other pages inherit from, and do not want "downlevel"-versions of the server-controls to be sendt to Google and W3C-validators. The best thing would be if this feature could be disabled for all users on all pages on my site. ...

ASP.NET Page Level Caching (with authenticated sites)

It is my understanding that page level caching does not take into account that, for authenticated sites, different users may request the exact same page (URL) while the rendered page itself is different (because it contains stuff that is user specific). Unless you activate cookieless authentication (then the sessionID becomes part of t...

Download files using asp.net

Hello all, There is a data file and some image files that I have to download to our local servers every night using asp.net. What is the best way to do this? UPDATE Ok, after viewing the responses I see my initial post of using asp.net is a poor choice. How would you write it for a console app in C#. I am not sure what classes I am us...

Passing LinqDataSource through Session: 'DataContext accessed after Dispose.'

I´m in need to pass some results from the database around. Instead of pass a whole dataset, or a constructed sql query, I tried to pass a LinqDataSource configured object. On the source page, I configure the LinqDataSource object properties Where and WhereParameters using the values set by the user on the controls displayed on the page ...

Can IE/ASP.NET read the LAN ID of a user

We are doing the analysis phase of a call centre system. To get round a potential tricky authentication problem, we might need to read the LAN ID of the agent and use that as their user id in the system. Is it possible to read the LAN ID from ASP.NET, or even from Javascript? ...

Can you have to 2 url's that point the the same page in an asp:Menu control?

Hello, I have an asp:Menu and it contains a top level menu item that points to http://www.abc.com/one.aspx. When you hover over the top level menu item, it shows a dropdown and one of the selections is One which points to http://www.abc.com/one.aspx. Apparently, I can't do this, so I have been putting a ? at the end of the second url ...

ICallBackEventHandler does not update controls with form values

I want to use ICallBackEventHandler however when I use it to call back to the server I find that my form control objects don't have the latest form values. Is there a way to force populate the values with the form data? Thanks. ...

ASP MVC form fields wrongly getting filled in.

I have an ASP MVC form which updates a business object and then its action goes to another page. Both of these pages have a textarea with an id "Description", when it goes to the other page, for reasons unknown it fills in the values which were entered before the form submission. ...

How do you deploy and manage a C# web application to a customer with some minor differences from your base project?

I have a semi-large web application that we run locally and I need to deploy it at another location. The second location will require some slight modifications to the project (especially cosmetic). How do you manage these differences and what do you use to distribute the site and updates to a customer like this? Edit: Right now our web ...

What should I use instead of Linq to SQL?

I've been reading about how Linq to SQL is dead (link here). So my question is what should I use instead? I already have a project full of Linq to SQL. What's the best thing to migrate it over to? ...

How do I configure extensionless URLs with the Visual Web Development server?

I'm using Visual Studios' built-in ASP.NET Development Server (VWD) to test my web site during development. I would like this ASP.NET web site to use extensionless URLs (pages don't require the aspx extension). Ordinarily I would configure a custom 404 in IIS that directs to an ASPX page. How would I do this with VWD? P.S. This is no...

Is it possible to use SimpleModal with ASP.NET MVC

Hi everyone, Is it possible to use SimpleModal (jquery plugin) with ASP.NET MVC. Since it has postback stuff init. thanx Owais ...

Writing efficient .Net/SQL Server code

Let me preface by saying I am not knocking .Net (it helps me earn my living)... I recently heard of a site were the developer/owner bragged that he had minimal hardware to support his site (plentyoffish.com). This site is listed as being in the top 50 in terms of traffic on Alexa. I am struggling to wrap my head around how something li...