asp.net

ASP.NET: How to redirect, prefilling form data?

i want a handler to redirect to a web-forms page, pre-filling in the values of some controls on the form. i tried setting my current Request.Form data: if (theyWantToDoSomething) { //pre-fill form values context.Request.Form["TextBox1"] = "test"; context.Request.Form["ComboBox1"] = "test 2"; context.Request.Form["TextBox2"]...

Force all asp.net requests to a single page?

Let me state off the bat that I'm not that familiar with ASP.Net MVC, and I don't think I have time for this project to become familiar and switch. I'm building a website where there's only one physical page, mysite.com/default.aspx. If a user browses to mysite.com/foo/bar, I (somehow) want my default.aspx to handle that request. I know...

Silverlight IninParams

I'm planning on hosting a Silverlight application in ASP.NET 2.o web application. The web app has to keep on targeting 2.0 framework for the foreseeable future. That rules out the Silverlight control as that would force me to upgrade my web app to 3.5. Fortunately, I can take the approach of adding the control with html My question is...

How to render and import an asp.net page into another asp.net page?

I have a ASP.NET page. I have another asp.net page, that i would like to render and import it's rendered results into my asp.net page. I don't want to use or use AJAX request as that would cause my visitors to make an unnecessary HTTP request and decrease performance. ...

DataTable.Select("ColumnName IN ") Guid error

I'm having problems with a DataTable line, the idea is that I want to pull out of a series of rows any rows where one of the column values is in a set of guids. However, I'm getting a guid / string comparison error from the select() function. The code is as follows: Dim sb As New StringBuilder For Each Row As DataRow In dtData.Rows ...

Handling error messages using asp.net

Hi, I've an asp.net page having a server side submit button and 2 textboxes which accept only numeric values.Am also using asp.net validation controls. If the user types in non-numeric data in both the textboxes, how do i show only 1 error message on the page saying: "Only numeric values are allowed." And I want to achieve this without...

Suggestions on a very complex ASP.Net input form design?

I am just starting on a complex data entry form and thought I'd ask for input from anyone that may have gone down a similar road before. The form is going to represent a cost estimate (plus additional information) for a project consisting of multiple tasks. All TaskTypes are pre-defined in metadata for a ProjectType, and can consist of...

ASP.net Membership and profiles in WCF

I'm working on a WCF service that requires Membership and Profile access. I got the Membership stuff working by using System.Web.Security.Membership class and calling CreateUser() and ValidateUser() but i can't get the Profile to work. I don't even know what class to call, all the samples that i have seen are for ASP.net like the one i ...

How to access controls collection of dynamically loaded aspx page?

Let's say I have two webforms, A.aspx and B.aspx, where B.aspx contains some simple web controls such as a textbox and a button. I'm trying to do the following: When A.aspx is requested, I want to dynamically call and load B.aspx into memory and output details of all the controls contained in B.aspx. Here is what I tried in the codebe...

jQuery, WCF and ASP.NET

Hi, Apologies if this is a dumb question. In previous ASP.NET projects, I've been using jQuery to communicate with an ASMX web service without a problem - including having the ability to enable interaction with the user's session state. I'm now dabbling in the world of Visual Studio 2010 and .NET 4.0 and I'm trying to do the same sort...

regex for alphanumeric, but at least one character

Hi, In my asp.net page, I have an input box that has to have the following validation on it: Must be alphanumeric, with at least 1 character (i.e. can't be ALL numbers). ...

Can you use Settings.Settings file for ASP.Net sites also?

I have a code base that has been used as an ASP.Net web application. It's now branching out and being used as part of two WinForms applications. The main difference is that the WinForms apps should store their settings "per user" and the web app only needs to store the settings at the "application" level. They are the same settings, bu...

SqlConnection in .NET -- How can i best harness connection pooling?

I read that .NET uses connection pooling. And, for example, if I instantiate a bunch of SqlConnection objects with the same connection string, then internally .NET will know to use the same connection. Is this correct? And, in a big web-based application, any tips on the best way to harness this "power" ? Thanks. ...

Implementing document management with an ASP.NET MVC front-end

I've implemented a website for a client that holds editable articles. I used ASP.NET MVC and made the content manageable by storing it in a 'Content' table in the database and creating a simple Admin section of the site, where the user can add/edit/remove content and choose where on the site it will appear. Now the client has come bac...

ASP.NET MVC how to implement link which returns to previous page?

Title said it all. Some context: I got a search mechanism - search view, search results view and a details view (which represents one item of results, like a formview in webforms). I want a link in details view, which would return user to search results view. Ideas: Just read about TempData, but i guess that wouldn't help, cause user...

ecommerce dynamic breadcrumb best practice - How Do you do yours ?

Hi everyone, I am looking for a best practice to provide users of my ecommerce website with a breadcrumb trail. Current Site Setup: ASp.net 3.5 SQL express 2005 DB DB Table Setup: [Category] - ID, parentid, name etc [Product] - ID catID name Should i use a sqlsitemap provider and everytime i save a product add it to the Sitemap tabl...

Define custom roles

I am developing a content management Site and define custom roles. Can anyone tell me the way how to get defined custom roles for my members and subsequent Menus for these roles and how to manage all these? Please note: We are not using Asp.net Membership Provider, we have to apply our custom roles. ...

Repeater pagination with checkboxes issue

I have a repeater that displays data from database, each item has a checkbox that are used to "mark" items for deletion and etc. (there is no item in database for chekbox!). Because I use pagination (on data access and presentation levels), there is no way to preserve checkboxes values between page movements. How can I solve this issue...

Asp.Net resource manager always returns neutral culture resources

I am using embedded .resx to localize an asp.net application. It seems that no matter what the current culture is, the neutral culture resource is always returned. The code I am using to retrieve the value is as follows: protected string GetResource(string name) { return Localization.ResCore.ResourceManager.GetString(name,...

ASP.NET MVC on Windows 7 RC and paramterized routes not working

Take a new MVC App, then code: routes.MapRoute("a", "a/{id}", new {controller = "Home", action = "A"}); public ActionResult A(string id) { return Content(id); } Going to http://localhost/a/sdfdgh results in: HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for ...