asp.net

ASP.NET AJAX vs jQuery in ASP.NET MVC

Which one is better to use in ASP.NET MVC? ...

Is using a const in a class in App_Code quicker/faster than using appSettings in config.web on a webforms asp.net app?

im wanting to know the fastest way to access my globals... they will only change in the beta testing phase. before we go live. from then on they wont change ever. im thinking that there is an overhead in getting stuff from web.config also its neater code wise to write App.HostUrl instead of ConfigurationManager.AppSettings["HostUrl"].To...

HTML template for ASP controls

I am writing an application that requires that my customer can layout their input forms in which ever way they choose. I would like to use an HTML template with placeholders, and then replace these with secified .NET controls at runtime: <table style="width: 100%;"> <tr> <td colspan="2"> <fieldset title="Customers Template...

How can I edit CSS on the fly with ASP.NET code?

Want to edit things like DIV size, color, positioning (absolute), height/width etc. ...

Is null harmful? [Duplicate]

Duplicate: http://stackoverflow.com/questions/163434/are-nulls-in-a-relational-database-okay I dodged a heated debate concerning nulls in the database today. My opinion is that null is an excellent indicator of unspecified values. Every one else in the team, that has an opinion, thinks zero and empty strings are the way to go. Ar...

In asp.net, I need to add validator to textbox that forces the input to be numbers

In asp.net, I need to add a validator to a textbox that forces the input to be numbers. Is this built in? I have already added a required field validator to the textbox. ...

MembershipUser constructor expects dateTime fields that might be null

The MemberShipUser constructor expects dateTime fields like lastLoginDate, which may be null in the data store. However, when I retrieve data from the store and pass null in for the parameter, I get an error that it cannot be null. How can I work around this? ...

When do you use XPath over XmlDocument or XmlTextReader?

When do you use XPath over XmlDocument? I'm trying to see things from a higher level. Is there a situation where it is better to use XPath over XmlDocument? ...

Business/Domain Object in ASP.NET

Just trying to gather thoughts on what works/doesn't work for manipulating Business/Domain objects through an ASP.NET (2.0+) UI/Presentation layer. Specifically in classic ASP.NET LOB application situations where the ASP.NET code talks directly to the business layer. I come across this type of design quite often and wondering what is t...

On postback, how can I add a error message to validation summary?

Two questions: On postback when a user clicks submit, how can I add a error message to validation summary? Is it also possible to highlight a particular textbox using the built in .net validation controls? ...

Setting a custom 404 error page programmatically

In a regular ASP.NET application, you might have a customErrors section like the following: <customErrors mode="On"> <error statusCode="404" redirect="Nice-FileNotFound-Page.aspx"/> </customErrors> Is it possible to set the 404 error programmatically at Application_Start? Something like the following: // Figure out which page shou...

Architecture: set-based data pipeline challenge

I'm working on a database driven web-application (ASP.NET, SQL 2008), which receives structured XML data from various sources. The data resembles a set, and often needs 'cleanup', so it is passed through the database as XML, and turned into a resultset for display. I'd like to capture the produced 'clean' results, and send them to an a...

Can I add an additional action to a DetailsView in ASP.NET?

Currently I have a DetailsView attached to a GridView. When you select an item from the GridView the details show up in the DetailsView (duh). Right now there are 3 event options on the DetailsView: Edit, Delete, and New. I would like to add a 4th, Format. This will simply run some queries and then perform a delete. Is this possible and ...

Regex validator allowing empty as an input

Hi, Shouldn't this regex validator make sure the user enters something in the textbox? For some reason an empty textbox passes through. <asp:RegularExpressionValidator ID="revNumericValidator" runat="server" ValidationExpression="^\d+$" ControlToValidate="tb1" ErrorMessage="Please enter blah (must be a number)." />...

Create PopUp with <asp:HyperLink> that is passing paramters

This HyperLink syntax is not working to pass parameters to a small PopUp window: <asp:HyperLink ID="HyperLink2" runat="server" Text="Manage Related Items" NavigateUrl='<%# "editRelatedItems.aspx?" + "ProductSID=" + Eval("ProductSID") + "&CollectionTypeID=" + Eval("CollectionTypeID")+ "&ProductTypeID=" + Eval("ProductTypeID") %>' oncl...

IIS 7 Default document setting for a mapped handler url

I have a web site that serves only one page from the root. The page (call it stuff.htm) is generated by a custom handler, and doesn't physically live on disk. I'd like stuff.htm to be the default doc for the site, but the standard configuration method of making it the default doc fails since the regular ASP.Net DirectoryListingModule is...

WSDL not interpreting generic properly

Hello All, I am designing a framework for the use of error codes in an already very developed application. There are several web services that handle database interaction and then there is the UI. If an error occurs in the web service the error code will need to be passed to the UI and processed (for showing user friendly error messag...

ASP.NET MVC query with optional field and value

What I'm trying to do is provide a generic search capability on a table. So the user is presented with all data in a table, they enter some text to filter on, and voila, the table is now filtered on all results that match that entry. I have this working with a single field: public ActionResult Index(string user_name) { var dataCon...

NHibernate ASP.NET and Encrypted Connection strings Error

I get an error: Format of the initialization string does not conform to specification starting at index 0 in teh nhibernate config section of the web.config I have this set to use the named connection string: MyConnectionString And when I try it I get an error, now this worked fine with unencrypted connection string, I thought it would...

Thread permissions in ASP.NET

I'm launching a lengthy import on a new thread in an ASP.NET page. Everything is working fine except that I get a failed IO permission when I try to write to my log file from the worker thread, which is not a problem in the primary thread. I am using IIS7 integrated mode without impersonation, although I got the same results with imper...