asp.net

How do you handle scheduled tasks for your websites running on IIS?

I have a website that's running on a Windows server and I'd like to add some scheduled background tasks that perform various duties. For example, the client would like users to receive emails that summarize recent activity on the site. If sending out emails was the only task that needed to be performed, I would probably just set up a s...

How To Divide Gotten Data from A Datatable And Bind Some Of Them To Headertemplate of Datalist

May be the subject is complicated, so I'll try to explain: I get some data from database which some of them has TypeId=1 and some has TypeId=2. I want to take data which TypeId=1 to header template and TypeId=2 to itemtemplate in the Datalist control. How can I do it? ...

Compile Views in ASP.NET MVC

I want an msbuild task to compile the views so I can see if there are compile time errors at well... compile time. Any ideas? ...

ASP.NET Dynamic Data - Globalization and Localization

Hi There Does anybody know how to create a multilingual web application using Dynamic Data and be able to show any label or button in the correct language upon the selected culture? ...

consume a asp.net web service that returns json from an stand alone html page

I've developed a web service in asp.net and am able to test it from an in-project aspx page and can readily display the information that was returned in JSON format. I now need to consume the web service from a stand-alone html page. Does someone have experience with this? I'm puzzled by the part that would replace this <asp:ScriptMa...

asp.net mvc: page can not found

I'm trying to setup the MVC development enviroment on my laptop. I'm running WinXP Pro with IIS 5.1 I got the environment setup with the sample MVC application that come with beta. I can only get to the home page. when i try to open About us page. i run into the page can not be found error. Is it the routing not set in the Global.asax? ...

CSS changes not reflecting on site.

Whenever we make changes to the CSS, it generally takes 24 hours to reflect those changes on my site. I have tried clearing the server cache and browser cache but it doesn't help too. Is there any other way to make the CSS changes reflect immediately after updation? it happens in all the browsers... when i check it in the browser , i ca...

Why .NET strips off one <form> tag from the page if there is already a form with runat server attribute?

It doesn't remove everything inside the 2nd form tag but just hides the and tags from the page Any ideas and workaround? ...

What are other ASP.NET web applications that are as well done as StackOverflow?

It's my understanding that StackOverflow (SO) was built using ASP.NET. What surprised me is it's so well designed and well implemented. Without knowing much about the internals of SO, here are my observations and educated guesses: SO appears to be highly scalable. URLs in SO are friendly. It appears that SO does not contain a bunch of...

How to seamlessly mix ASP.NET and PHP Web applications

I have two websites, one driven by ASP.NET and the other in PHP. The PHP site is hosted on a relatively inexpensive host provider ('unlimited bandwidth and diskspace for $10 a month). The PHP site also provides REST URLs which would help me in monetizing my website. The other site (the 'main' site, as it were) is an ASP.NET website wh...

How to safely and effectively cache ADO.NET commands?

I want to use this pattern: SqlCommand com = new SqlCommand(sql, con); com.CommandType = CommandType.StoredProcedure;//um com.CommandTimeout = 120; //com.Connection = con; //EDIT: per suggestions below SqlParameter par; par = new SqlParameter("@id", SqlDbType.Int); par.Direction = ParameterDirection.Input; com.Parameters.Add(par); H...

Adding javascript to the OnBlur property of an ASP.NET text box control

Is there a way to specify some JavaScript to execute on the OnBlur event of an ASP.NET text box? It seems to me like if I add any event handlers to the TextBox object they will just cause postbacks to the server isntead of doing what I want. Basically, I just want to be able to have the textbox be rendered in this HTML: <INPUT type="t...

Properly referencing controls in ASP.NET user controls in JavaScript

I have an ASP.NET user control that contains a text box control and a button control. This user control will be added to my web-page many times. I need to have a piece of JavaScript that will run whenever the text box changes, and disable the button if the value of the text box is invalid. My question is this: how do I put JavaScript ...

Can I make money if I release my CMS as opensource

I have a CMS that I've written in ASP.NET. It still needs work and I'm thinking of releasing it as opensource. I'm just not sure how I want to handle this in the future. If I release it now as opensource, can I still release a commercial version? What other ways are there for me to make money on the CMS? ...

How to do a custom asp.net routing (hardcoding the controller)

I'm trying to create a route for the following urls: www.mysite.com/user/username www.mysite.com/user/username/pictures I tried doing that with the following code: routes.MapRoute( "UserProfile", "user/{sn}/{action}", new { controller = "User", action = "Index", sn = "" } ); So if an action...

Is there a way to access a cache or session from a static method?

How would you access the cache from a jQuery ajax call? I'm using jquery to do some data verification and quick data access. I have a static web-method that jquery is calling via json to return a value. I don't want to call to the database everytime so I'd like to cache the data I'm hitting, but I can't determine how to call the asp.ne...

Event handling in Dynamic asp.net user Control

Hi all, I Have a page, where I want to dynamically add asp.net user controls. The scenario is that we want that on specific event of a control, It disposes itself and loads another control in the page. I am not able to have solution how to do this? any one have decent Idea, Please help.. Thanks Singh Ajay ...

how to know which Image has been requested C#,ASP.Net

I am developing a web app. which will generate a random link pointing to an image on my server. something like -http://dummy.com/Images/Image1.jpg?id=19234 Here this link can then be used by anybody on their site, now I just want to know how many sites are using my links, without anybody clicking on those links. Can It be done using HT...

ASP.NET : Intermittent 'Access Denied' Error When Uploading Files

I have a .NET program to upload an image to a webserver. I am using the ASP.NET file uploading control to do it. The program works alright in my local environment but when I run it on the webserver, I get the following error: > System.UnauthorizedAccessException: > Access to the path > '\\fsvs02\target03\352972\352974\www.mysite.com...

Breakpoint not hit when remote debugging on Internet for ASP.NET

I have sit up remote debugging on a Window 2003 server accessed through the Internet. I have VS 2008 SP1 installed on my XP dev box. I launched the site on the remote server and attached to all the w3wp.exe processes on the remote server. I noticed that the .dll did not load the symbols file. When I try to load the corresponding .pdb fi...