asp.net

iPhone web app development in ASP.NET - where to begin?

For iPhone web app development in ASP.NET, where do I begin? I'm considering using ASP.NET MVC, but how do I get started? Are there any weird caveats I should be aware of? Looks like these might be good resources: Mix: Mobile Web Sites with ASP.NET MVC and the Mobile Browser Definition File Rock the iPhone with ASP.NET MVC ...

Entity Framework with strongly-typed MVC

I'm using the ASP.NET MVC and the ADO.NET Entity Framework together. I want my Views and Controllers strongly-typed. But how am I supposed to handle entity associations? Here's a simple example: A Person has one Department. A Department has zero or more People. My controller passes an instance of a Person object and a collection ...

Entity Framework with ASP.NET MVC

How can I use strongly-typed Controllers with EntityObjects? My failures... First I tried this: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Edit(Guid id, Department Model) { db.SaveChanges(); return RedirectToAction("Index"); } This failed to actually save any changes to the database. So, I tried to attach the model t...

How to manage various ASP.NET Web Site project references and autoupdate

I have a Visual Studio 2008 Web Site project in a solution with a number of other assembly projects. The Web Site project has 4 types of references: Project, BIN, COM interop, and text files. The Project references autoupdate perfectly. The BIN references for managed DLLs autoupdate with .refresh files, which work well and can be chec...

JS/CSS include section replacement, Debug vs Release

I'd be interested to hear how people handle conditional markup, specifically in their masterpages between release and debug builds. The particular scenario this is applicable to is handling concatenated js and css files. I'm currently using the .Net port of YUI compress to produce a single site.css and site.js from a large collection of...

Which is better for a dependency: Web Service vs XML?

I’m creating an application that has a data dependency on another group’s data feed. They can give me a daily xml dump of the data that I can simply load into cache once a day OR I can make calls to a web service to get the data that way. If the data provider doesn't care which I use (same work for them either way) which should I ask fo...

Exception Logging for WCF Services using ELMAH

We are using the excellent ELMAH to deal with unhandled exceptions in an ASP.NET 3.5 web application. This works extremely well for all of the site apart from WCF services which are being consumed using the REST features. When an exception occurs within the operation methods that is not handled by the application code, WCF handles it in ...

How to check case sensitive password in sql server08

Hi All, In my application I am sending password to database,lets say my Password is PassworD123. Now this is giving me proper value ,but when i am using password123..its also giving me the proper value.So how to chaeck for case sensitive data in SQL server. Any demo code will help. Thanks. ...

get index of the current datarow in a datatable

For Each dr As myDAL.UsersRow In data str.AppendLine(dr.UserName) Next in the above code, I also need to include the row index so that it's something like; str.AppendLine(dr.IndexNumber & " " & dr.UserName) How can I achive this? P.S. data is not a datatable but a generic list of myDAL.UsersRow ...

Dundas vs ComponentArt which one is better

Planning to buy a charting solution (for ASP.NET), narrowed down to Dundas and componentArt. Is there a feature comparison sheet, comparing these two components? Has anyone used both of these and found any one of them to be better than the other? I had used ComponentArt in a project before and was impressed with its 3d like color sett...

Bind XMLDataSource to HTTP handler

Hi I have some dynamically generated XML data that will be consumed by a few consumers (An ASPX page, a flash file and maybe another one as well). I have implemented it as a custom handler. I construct the XML in the handler and output it using response.write. Now If I set the DataFile property of my XMLDataSource to the handler, it ...

Visual studio refactoring - move class to assembly

Hi, I'm looking for the simplest (and most complete) mechanism to move a class from one to another assembly with reference (dependency) fixing capability.I know some manual ways to do that like : - use built-in move rename, then cutpaste, multiple save ... - use resharper rename namespace, cutpaste , the same as above but with the ...

Adding more details to exception handling with Enterprise Library

I am using Enterprise Library 4.x for my exception handling logging (ASP.NET application). Here is the EntLib method I am calling: ExceptionPolicy.HandleException(ex, exceptionPolicy.ToString()); How can I add a bit more details to the exception, like current request url, current user name, etc.? I know I could wrap it in my except...

Web browser lock-down: How to?

Hi, I have an ASP.NET web application where a portion of it needs to run in a web browser as a public facing terminal. Essentially it is used to capture anonymous user feedback (wizard control on a .aspx) in a commercial location such as a shop. An administrator will login and prep the application for 'terminal' mode. The terminal is...

ViewState is taking 20% of my pages even though it's disabled!

I disabled viewstate in the web.config file (and there's no EnableViewState = true anywhere on the pages), but despite this, the pages are rendered with a quite large view state (8k for a 40k page). I checked the viewstate contents with a viewstate decoder and discovered that the multiview controls I'm using on my pages are the guilty on...

Iterate through website class methods using MSBuild

I am trying to find information on using reflection within a MSBuild task. I need a way of iterating through the methods of a class contained with a website, at build time. Is this possible? Is MSBuild the best tool to use? Is this an unreasonable requirement, I can't seem to find any documentation on the subject? Any help would be muc...

How to remove dynamically created controls in asp.net

I have created some file upload control at run time in a panel..now i want to remove control on a click of link button. how can i do this.. following is the code for crating control dynamically.. protected void LinkButton1_Click(object sender, EventArgs e) { Panel1.Visible = true; newattach(count); count++; } privat...

ASP.NET: Get node selected on an ASP.NET TreeView by Client Side JavaScript

Hello! I need to know the selected node's depth from a ASP.NET Treeview on client side. Is there anyway to know this? Thank you! ...

rsa data decryption error.the system cannot find the file specified.

I am doing encryption descryption with rsa provider and it is giving following errors. rsa data decryption error.the system cannot find the file specified. Any one have any idea I am also using identity in web.cofig. I have also given all rights to rsa folder where the key generating but still it is there. Another strange thing is th...

Using PageMethods with jQuery

Simply put I want to call public static methods decorated with WebMethod attribute inside my code-behind C# file from jquery.ajax to get some json and other simple stuff (in different functions). But instead I'm getting whole page :'( I'm not using asp.net AJAX though I'm developing for .NET 3.5 framework and using VS 2008. (There are s...