asp.net

Validator in <noscript> causes JavaScript error

The following .NET 3.5 code, placed in an aspx file, will trigger a JavaScript error when the page is loaded (for users who have JavaScript enabled): <noscript> <asp:TextBox ID="txt" runat="server"></asp:TextBox> <asp:RequiredFieldValidator ID="txt_RequiredFieldValidator" runat="server" ControlToValidate="txt"></asp:Requi...

Cache VS Session VS cookies?

What are the do's and don'ts about Cache VS Session VS Cookies? For example: Im using Session variables a lot and have sometimes problem in a booking-application when users starts to order products and then goes to lunch and come back some hours later and continue the booking. I store the booking in the session until the user confirm or...

Refresh the page after a postback action in asp.net

I have command button added in my asp.net grids. After performing an action using that button, we refresh the grid to reflect the new data. (basically this action duplicates the grid row). Now when user refresh the page using "F5", an alert message is displayed (to resend the information to server) if we select "retry", the action is re...

List of Links

I have two tables, one for Regions and one for those regions Areas, i want to automatically create a list of links that will be like: Region1 a.Area1 b.Area2 c.Area3 Region2 a.Area1 etcetc This link should be generated automatically when i load my page. The items in the list are not only text, when i click on Area1 i will call a...

How to map Items which its SubItems are in the same Table with Nhibernate?

Hi, I am trying to build a messaging system and for this i have the table definition below Message Id From To Body ParentId // Subcollection, i want to get Asnwers (Message.ParentId== Message.Id) IsRead and i have this in the Message.cs IList<Message> Answers; I have tried this but it gives me all the messages and all the answers...

Best Practice ASP.NET Membership: User tables in the same datastore?

Is it better to extend my business database with the tables of the ASP.NET Membership Security model. Or should I have a different datastore where I only manage Identities and Roles... Basically 1 or 2 databases? ...

Error when calling ASP.NET web services from Javascript

I'm trying to call a ASP.NET web service from Javascript, and it won't recognize the Web Method, even when I fully qualify the name, I'm trying to figure out what is wrong. Here is the part of my web.config file: <httpHandlers> <remove verb="*" path="*.asmx"/> <add verb="*" path="*.asmx" validate="false" type="System.Web.Scri...

Does the word "Webservice" imply a specific format?

Bare with me if this question is plain stupid... When I talk to an developer from the Microsoft ASP.NET world and he uses the word "Webservice", does that word in every case imply a specific data format (XML? SOAP?)? Or is it just anything you can call via http(s)? ...

How to exclude a specific CSS file from an ASP.NET Theme?

I'm making a website that will have to render correctly on FF/IE6/IE7/Opera/Safari. IE6 came as a late requirement (when I had done all the other browsers) and it just has to be useable, not necessarily the same as on the other browsers. Now I'm tweaking it so that it's useable on IE6 as well. To this end I've created another stylesheet...

Syntax-highlighting textbox for Winforms, ASP.NET, WPF

Folks, I'm looking for a syntax-highlighting Textbox component, preferably free, with source, and capable of being used in Winforms, ASP.NET and WPF alike. Also, it should support not just display, but also editing contents. I've discovered the excellent, FREE ActiPro SyntaxHighlighter for ASP.NET - but that's unfortunately ONLY for AS...

Weird trouble - cannot assign javascript to linkbutton

I seem to manage the same task many times beforehand; but currently I got thoroughly stuck at the simplest thing and it have made mequite irritated I need to assign javascript to ASP.Net linkbutton (or hyperlink, does not matter) What seems to be easier? Billion times I did it with code like like that //lbHeader.Attributes.A...

More information about Custom Webcontrols?

Where I currently work we use a lot of hand made custom web controls for things like dropdown lists, auto-complete boxes, etc. and while I have added things to these controls I never really felt like I completely understood what the heck I was doing. So, my question, are there any good books out there that might help me understand / bu...

How can I make an async call in Javascript onunload element?

I have a system where items are locked (with a flag in the database) when a user is vieiwing that item. Currently the item is only unlocked when a user performs a certain action. However, when a user leaves the page through any method, I'd like to make a call to a webservice / ashx page that will unlock the item, but not stop the pag...

How do I give javascript variables data from ASP.NET variables?

I have created a SCORM API for our LMS and right now I am using hard coded userID and courseID variables (variables that reference things in the database). I need to pass the real userID and courseID instead of using hard coded ones. I know the userID is stored in the session and the courseID is passed over from the launch page. How do ...

ASP.NET content/functionality versus design/layout/styling

When developing a web application using ASP.NET, do you have any hints about how to separate the development of content/functionality from the design, so that the two can be developed separately and in parallel? The situation is: Customer has agreed on what functionality they want Customer is changing their mind about the appearance (...

Custom ASP.NET MVC 404 Error Page

I am trying to make a custom HTTP 404 error page when someone types in a URL that doesn't invoke a valid action or controller in ASP.NET MVC Instead of it displaying the generic Resource Not Found ASP.NET error I don't want to use the web config to handle this... Is there any kind of routing magic I can do to catch any invalid urls? ...

asp.net mvc Adding to the AUTHORIZE attribute

How do I create a custom attribute to extend existing Authorize attribute in MVC? ...

How can I hide weekends when using the ASP.NET Calendar control?

Sometimes when displaying a calendar it is necessary to prevent the weekend days and the weekend names in the day header from showing, is there a way to do this using the ASP.NET Calendar control? ...

which of is better between css or master pages for web page layout & design?

of course please tell me that css is better and faster or master pages for web layout and graphic design . ...

asp.net Open Source Shopping Cart

I'm looking for a shopping cart solution for asp.net, but as it's quite a low price solution, don't want to buy one/spend too much, so something open source, or reasonably priced (eg less than $500). It needs modifying for our purposes, so need source code. Alternatively, is there any good way of doing a "hosted" cart with an api which...