asp.net

Updating the view count of a webpage in a database

I have a database table called "Posts" which stores all the information regarding an article submission on a website. There is a column named "Views" which is a value that gets incremented each time that particular post gets viewed. The process is this: Get the record from the database Increment the current by one Save the changes t...

ASP.NET - Ajax requests with jQuery

Hi, I've got this textBox which triggers off an ajax request using jQuery: <asp:TextBox ID="postcodeTextBox" runat="server" Text='<%# Bind("POSTAL_ZIP_CODE") %>'> $(document).ready(PageLoad); function PageLoad() { $(container + 'parentProjectTextBox').change(GetProjectName); } function GetProjectName() { var projectNumber = ...

Newlines escaped unexpectedly in C#/ASP.NET 1.1 code

Can someone explain to me why my code: string messageBody = "abc\n" + stringFromDatabaseProcedure; where valueFromDatabaseProcedure is not a value from the SQL database entered as 'line1\nline2' results in the string: "abc\nline1\\nline2" This has resulted in me scratching my head somewhat. I am using ASP.NET 1.1. To clarify,...

ORMs that generate database structures from classes

I have looked at NHibernate and EntitySpaces and they both seem to work differently. In EntitySpaces, you define the database tables and table relationships and the classes are generated for you. In NHibernate, you define the classes and the table relationships are generated for you. This is what I am looking for. Are there any other ...

Expire Output Cache ASP.Net MVC

I am using the standard outputcache tag in my MVC app which works great but I need to force it to be dumped at certain times. How do I achieve this? The page that gets cached is built from a very simple route {Controller}/{PageName} - so most pages are something like this: /Pages/About-Us Here is the output cache tag that is at the to...

Best .NET Books covering ASP.NET 3.5 with ASP.NET AJAX

I'm looking for the best technical books that cover ASP.NET 3.5 with ASP.NET AJAX? Ones that gives the strongest examples of ASP.NET Ajax and exploring the client-side Sys.* objects. Also examples using the WCF-based webservices to handle Ajax requests. ...

View the data that LoadPostData event is loading in ASP.NET

What's the best way to view the data that LoadPostData event is loading to the controls in ASP.NET? ...

Recommend ASP.NET 3.5 SP1 Hosting Providers

Would like to see a list of affordable ASP.NET 3.5 SP1 Hosting providers build up. Along with your review of the service, lacking features, special features, etc... Discount ASP.NET MochaHost At last update MochaHost does not offer SP1  they now offer SP1 CrystalTech Gearhost HostMySite please add more update: Anybody see a b...

DevExpress ASP.Net Component on Mono

I'm a happy user of DevExpress components, though currently I'm still on a linux web host. In another thread I've spoken about my plans to move to a Windows environment so that I can use DevExpress's ASP.Net components. For some time now DevExpress's stand has been that their components is not likely to work on Mono, due to heavy usage...

Enum.ToString() not working in tooltip

Hi, I have a Linq Query where I do the following: query = context.Select(a => new { Course = (CourseType)a.CourseCode, CourseDetail = sting.Format("Course: {0}\r\nCourse Detail: {1}", ((CourseType)a.CourseCode).ToString(), a.CourseDetail) }); enum CourseType{ Unknown = 0, FullTime = 1, PartTime = 2 } a.CourseCode is an int...

JSON parameters auto. convert to lowercase when ajax request made to MVC action method?

Would anybody know why my parameter is being "converted" to lowercase when it hits my ASP.NET MVC controller action? I can only assume it is being converted as looking at data value just prior to the ajax request it is in correct casing, but then when debugging my action method within .NET during the ajax request and checking the incomi...

Newest Microsoft Chart and ASP.NET MVC

Recently ASP.NET developer launched its newest control, Charting control. (Microsoft Chart). Does this compatible with ASP.NET MVC, or its only compatible with ASP.NET WebForm ? ...

ASP.NET RadioButton messing with the name (groupname)

I got a templated control (a repeater) listing some text and other markup. Each item has a radiobutton associated with it, making it possible for the user to select ONE of the items created by the repeater. The repeater writes the radiobutton setting its id and name generated with the default asp.net naming convention making each radiob...

Quickest way to get Scaffold code created with C#/ASP.NET

At the start of any project, once you've got your object model there then comes a period of tedium as you crank out the skeleton code required. Are there any tools that will help me with this task (including unit test skeletons if possible), a bit like the scaffolding feature in Rails? Thanks. ...

Calling server event of a button in ASP.NET from Javascript

I have a button, I need to display a pop-up in javascript. So on its client click I call a javascript function which does that. if user clicks "yes", I need to do a post back and call buttons server side click event, here is what I am doing inside the javascript function __doPostBack(deleteLinkButton, 'Click'); ' Where deleteLinkBut...

Detect mobile supported languages

Is it possible is asp to detect from the MobileCapabilities object if the device support arabic or not ...

How do you forward http request to a https url

Like the question says, if I have a request for a page on my site like this http://somename.something.here/Dada.aspx to something like this https://somename.something.here/Dada.aspx ...

HttpModule doesn't seem to work

I've created a simple HttpModule to log the uses of my existing webservice. There's a dll containing a single class public class TrackingModule : System.Web.IHttpModule { public TrackingModule(){} public void Init(System.Web.HttpApplication context) { context.BeginRequest+=new EventHandler(context_BeginRequest); ...

Invisible Buttons

I have a server side ImageButton, and a server side Button, and then a simple HTML input-type="button". Neither the ImageButton nor the plain HTML button are visible, nor the alt text of the ImageButton. However, they are rendered out onto the client side HTML when I inspect it. Anyone have any ideas? <asp:ImageButton runat="server" ...

What is the best way to limit the amount of text that can be entered into a 'textarea'?

What is the best way to limit the amount of text that a user can enter into a 'textarea' field on a web page? The application in question is ASP .NET, but a platform agnostic answer is preferred. I understand that some amount of javascript is likely needed to get this done as I do not wish to actually perform the 'post' with that amount...