asp.net

How do you activate the MVC templates in VS2008 from a WebForms App

I'm in the process of adding ASP.NET MVC to a WebForms app. One of the neat features of an ASP.NET MVC solution that you create from scratch is that a right click on the solution explorer and Add > New Item... will give a list of templates which include the MVC templates. However, in a WebForms app these templates don't appear. I though...

How to pass in runtime a index of row for ListView ?

Hello everyone, I have an question, On my page i have a ListView control, I also have a button that has CommandArgument. I know i can read and find a control in the ListView as : ListView.Items[i].FindControl("controlname"); and my button in ListView is like that asp:Button ID="WisdomButton" runat="server" CommandName="UpdateWisdom...

System.Web.UI.WebControls.Calendar is it possible to change the color of individual selections?

I have code to do multiple selections in a calendar control but I would like to change the color of the initially selected day to green and the end date to red. Visually this would indicate the start date and end date of a certain service to be provided. Should I be looking into RenderControl Method for my calander or more looking int...

.Net: Using a Webservice as an interface for a Data Access Layer

I am currently doing a CRUD project for school and basically they want us to have this kind of structure (3 projects): Class Library Contains all the Data Access logic (Retrieving the data from the database with either Linq of standard ADO.Net) Web Service Having a refere...

Large File uploading to asp.net MVC

I need a way to upload large files (600 mb to 4 gb) in an asp.net mvc website. Currently I am using swfupload; it works well enough, but it is a huge hit on the webserver because it sends it in one big upload, plus I have to set it in the web.config to allow that huge of a file, which is a huge security risk. In the past when I was doin...

Inserting code in forums

If we insert code in asp.net forums we have to put any additional tags in code for displaying??because so many sides my code is not coming in questions but if we are going to edit question the code is coming ...

Compile .dbml file into separate assembly

I have a website project, and using Linq to SQL in it. Currently, I have my .dbml file in the App_Code directory, but I want to separate it out into a different project in order to compile it into a separate dll; is it possible? I tried adding a DB project to my solution, but didn't have much luck with it. ...

Windows Integrated Authentication Conflict With MS-SQL 2000 DB Connection With Integrated Security

Hi, We are developing an intranet web application on .NET 2.0 platform. The application is using Integrated Windows Authentication for Single Sign On. The users are authorized to use diffent modules according to the Active Directory Groups they are in. Up to the point where authentication and authorization is accomplished everything w...

Which Data Acccess layer is the recommended today for ASP.net?

Good day! I'm currently building a small website where I write down problems that arise and answers to them for others to see. Currently I'm using a DAL much like the one described here. Now I have been looking at other models, and in particular linq based models using Linq2SQL and the ADO.net Entries framework. I realize I'm moving the...

Looking for resources on using the ASP.Pipeline for Aspect Oriented Programming.

It struck me this morning that the ASP.NET pipeline could actually be quite useful for front-side aspect oriented programming, hooking into requests and responses to 'inject' processing into a set of resources requested, e.g. calling a method for each page when requested, instead of deriving each of the target pages from a base that does...

Application_Start not being hit in ASP.NET web app

I'm trying to debug something in the global.asax.cs file in an ASP.NET web app and have set a breakpoint in the Application_Start() event however that event is not getting fired when I start the web app inside VS2008. I'm targeting the 3.5 framework. What could prevent this event from being fired? Or how could I have messed up the proje...

Implementing observer pattern using WCF

When I first posted this question I had strong coupling between my web service and application controller where the controller needed to open multiple threads to the service and as it received back data it had to do a lot of processing on the returned data and merge it into one dataset. I did not like the fact that the client had to so m...

Rake Strategy, DotNet Implementation

When reading about and playing with Rails last year, one of the tools that made the biggest impression on me was Rake. A database versioning system that keeps all dev db's identical integrated right into the build...something like that would make life so much easier (and safer)! However, one of the things that I haven't been able to fi...

Calling a Class in ASP.NET

Hi I know my ASP.NET but i have to admit, i am dumb with classes and not sure how they work exactly. Also have not worked with them yet but i want to. But what I do know is that it's a place where i can keep code for re-use correct? How will my class look with my code? So this is my code i use on about 3 forms - but i want to save it i...

How can I deploy my ready website?

I have well developed an ASP.NET website with SQL Server 2000. How can I drop it on a server? ...

Why does my website constantly freeze?

This is a pretty vague question and getting it answered seems like a long shot, but I don't know what else to do. Ever since I made my website live every now and then it will just freeze. You click on a link and the browser will just site there looking like its trying to connect. It seems the freezing can last up to 2 minutes or so, th...

ASP.NET System.Data.EntityClient connection string help.

Hello, I'm running ASP.NET MVC on a shared server and I'm having problems connecting to SQL via System.Data.EntityClient. Below is the connection string that my hosing provider gave me to connect to SQL and the one that VS configured for my local machine during development, what should my connection string look like when I deploy to the...

Can’t access an aspx page via IIS

Hello, I’m running IIS 5 on Windows XP professional I created new Web project and configured VS 2008 to save this application to location c:\Inteput\wwwroot. Thus VS saved the project into directory: c:\Inteput\wwwroot\WebApplication1 I then transformed this WebApplication1 folder into virtual directory (this virtual directory ...

Extending enums via user input

I have the below enum that I use for one of my filters and suit well to my object model public enum ColorGroups { White = 1, Brown = 2, Red = 3, Black = 4 } My concern is in the future when a client want to another color to the collection how do I extend the collection. I want the system to be fully dynamic and does no...

Comments table with multiple types of parents

My site (ASP.NET/C#/MS-SQL 2005) has multiple sections that allow for comments (User profiles, image pages, videos, etc). I want to store everything in a single comments table. My issue is linking the comment back to its parent. The user profiles' primary keys are uniqueidentifiers, while the images and videos use ints. I'd like to ha...