asp.net

Accessing HTML Elements in ASP.Net

I want to change the text of a radio button (html element) not ASP.NET component. How can I change it from ASP.NET? Thanks ...

ASP.NET: Web Site or Web Application?

When I start a new ASP.NET project in Visual Studio 2008, I can either create a new ASP.NET Web Site or an ASP.NET Web Application. What's the difference between these two project types? Why would I choose one over the other? If I'm using Visual Studio 2005 instead of Visual Studio 2008, is the answer different? If I'm using Visual St...

How to effectively filter listboxes based on multiple listboxes and combinations?

I have an aspx page with 5 listboxes. Each listbox can filter the other one, so if the user selects an item in listbox 1, listbox 2, 3, 4, and 5 should be filtered. If the user selects an item in listbox 3, listbox 1, 2, 4, and 5 should be filtered. The filter can go forward and backward. Another scenario would be where I select an i...

Gracefully handling booking at same time and day

Hi, Lets imagine I have the same database schema as here: http://www.databaseanswers.org/data_models/driving_school/index.htm If a customer makes a booking and it is in the same day and time as another booking, how can I gracefully handle this business problem? Furthermore, what if two bookings are made at the same time? This is a conc...

What's the difference between System.Web.UI.HtmlControls and System.Web.UI.WebControls

I am comparing the two base classes of each namespace and am a bit confused. System.Web.UI.WebControls.WebControl System.Web.UI.HtmlControls.HtmlControl I see small difference between the two. For instance, HtmlControl has much fewer properties while WebControl has a lot of properties like the CssClass property. Other than just extra ...

Call a server side method using __DoPostBack by the name of the method

hello, i want to call a server side method using __DoPostBack and generating the HTML, but i dont want a hidden ASP runat server control in my page its possible to call a server side method by its name not by the name of the control that trigger it ?? ...

Is it possible to add a web user control to a class library?

I'm looking at building some web user controls with an eye toward re-use, but I can't seem to add a Web User Control in my class library in VS2008. Is there a way to work around this problem, or is there a better approach to creating reusable controls? ...

ASP.NET MVC with Spring.NET and ModelBinder

Hi all, I'm working on a demo that makes use of Spring.NET IoC capability in ASP.NET MVC . It's kind of like the MyBlog application presented on pair programming video tutorial on www.asp.net site. I've completed the same demo using Microsoft's Unity framework and now want to try out the Spring container. To that end I've implemented a ...

"Connection Partially Encrypted" in Firefox

I can't figure out if this is a bug in Firefox or an anomaly with the website as it only seems to occur through a specific sequence. TLDR steps below If you visit the main page (link below) and then click on the quotes link it will send you to a page called quoteconfig.aspx which checks for javascript and then redirects you if it's ena...

ASP.NET Routing in WebForms - Blank Page Bug?

OK, I have a standard ASP.NET WebForms Application (3.5, SP1)... I've just added the System.Web.Routing DLL, and set a route to a point to a new handler. That handler is VERY VERY simple, and simply returns a new instance of a standard page. Code here: public class ReportRouteHandler : IRouteHandler { IHttpHandler IRouteHandler.Get...

Using Cookies for Web Session State - What are the pitfalls?

Using in-process session state is evil when it comes to scaling web applications (does not play well with clusters, bombs out when server recycles). Assuming you just need to keep a small amount of information in the session state, what is the downside of using encrypted cookie items for this purpose rather than specific state servers/d...

ASP.NET Caching

I can't seem to get it to "work". Perhaps I'm not even testing it correctly. I've got a <%= DateTime.Now.ToString() %> line in my aspx page. I've tried setting caching declarativly like this <%@ OutputCache VaryByParam="SchoolId" Duration="180" Location="Server" NoStore="false" %> I've also tried setting it programmatically via the...

HTTP status 403: Forbidden exception using certificate to authenticate ASP.NET web service

I posted days ago about access control to web service (http://stackoverflow.com/questions/390853/access-control-to-web-service). In short, I have an ASP.NET web service deployed on //service/webservice and I want my ASP.NET web application (app1) on the //web1 to access the web service with certificate authentication. I keep getting Syst...

How to submit a form using the Enter key in asp.net

I have 3 buttons in a form. One of them is the submit button. How can I make it the default button to be clicked when I press the enter key. Is there a property for this? ...

ASP.NET MVC - using the same form to both create and edit

Whats the best practice approach to creating a form that is used to both create new models and edit existing models? Are there any tutorials that people can point me in the direction of? Cheers ...

jquery UI Dialog and Asp.net UpdatePanel

I am looking for a JavaScript modal dialog solution for asp.net, jquery UI dialog seems good but it move dialog container to bottom of body tag. I changed the dialog code to stay dialog to asp.net form but still it's out of updatepanel. Is there any solution or more compatible dialog that doesn't break asp.net form lifecycle? Thanks ...

Should I use the same controller and view for editing and creating models in ASP.NET MVC?

Should I use the same controller and view for editing and creating models in ASP.NET MVC, or should I create a view and controller action for creating and a view and controller action for editing? The editing view is certainly likely to be different - it doesnt always make sense for the user interface for editing an object be the same a...

Is it ok to use .NET MembershipProvider to have multiple virtual "applications" on one web application?

I want to build portal-like asp.net web application from scratch and was looking at asp.net MembershipProvider as a standard way for user's management. I created my provider inheriting from SqlMembershipProvider and override ValidateUser method: public override bool ValidateUser(string username, string password) { ...

IE closing just opened popup window

I have a ASP.NET button on a page that opens a popup window this way: String cstext1 = "window.open('ReportViewer.aspx');"; ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), Guid.NewGuid().ToString(), cstext1, true); The ReportViewer.aspx file gets some data, passes it to crystal reports and streams the PDF output ...

What can I do to optimize my web page for a mobile phone, specifically the iPhone?

So I purchased myself an iPhone ... everybody has one ... so I figured I'd see what the big deal was. To my surprise ... and overall skepticism ... I must say that I am very impressed with the iPhone. There's not any real magic going on here ... it just seems to be a very clean and very easy to use device. So now I'd like to take our ...