asp.net

asp.net best practice string concatenation

I am trying to find the best practice for generating and outputting html which would require a database query first to obtain the info. Currently in the aspx page I have a div with runat server: <div runat="server" id="leaflet"></div> Now just as a start to do a bit of testing I have a method that runs on page_load that basically does...

what is the easiest way to retain values of fields while switching from page to page.

Hi, I am using Multiview. And I am switching between views. Each view contains lots of fields. I am going to another view from the current view to add some data. And after adding data from the new view, I am returning to the previous view. Now on this view I want to populate fields which I have entered before switching. Currently I am u...

How to extract element id attribute values from HTML

I am trying to work out the overhead of the ASP.NET auto-naming of server controls. I have a page which contains 7,000 lines of HTML rendered from hundreds of nested ASP.NET controls, many of which have id / name attributes that are hundreds of characters in length. What I would ideally like is something that would extract every HTML a...

Asp.net CheckBox.Enabled = false problem.

Why on earth asp.net CheckBox doesn't render to a client-html if you set the Enabled property to False on the server-side ? Purpose of having Enabled=false is simple - you don't want user to change the CheckBox sometimes. Thx for your help ! ...

Starting process from Web Application

Hi, I am actually trying to start a process for winzip and zip a folder. This i am doing using the below code in vb. Dim startInfo As New System.Diagnostics.ProcessStartInfo Dim pStart As New System.Diagnostics.Process Dim tempFileName As String Try startInfo = New System.Diagnostics.ProcessStartInfo( _ "c:\Program Files\WinZip...

ASP.NET Session State Migration

I was hoping someone could validate my assumptions before I recommend that my client upgrade from a 30/mo to a 80/mo hosting package. Site: the site is a custom ASP.NET ecommerce site. the shopping carts are stored in the inproc session. Problem during busy seasons like we are having now, users are frequently losing their shopping ca...

ASP file being caught by .NET isapi

I need to serve up a few .asp pages from within my ASP.NET site. This ASP.NET site has a handler that allows us to serve up pages out of the database instead of finding them on disk (where the .asp files are located). The problem appears to be that the .NET isapi (C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll) is catchi...

Updatemodel error when list item removed

I have an edit page to edit some info. the page fills a complex object. one of the properties of this object is a generic list. If I just edit information and save, updatemodel works fine. if i remove (I do this using jquery to remove the form elements client side) something from the list the updatemodel fails with an "object not set to...

enableviewstatemac in master page

I am getting "Validation of viewstate MAC failed" and from what I heard you could add enableviewstatemac = false on each page or web.config, so instead of changing into every page can I just change in master' page so that I don't have to change on all the pages. ...

asp.net, url rewrite module and web.config

Hi, i'm using ASP.net with .NET 3.5 on IIS7 (Vista) with the URL Rewrite Module from Microsoft. This means, that i have a <system.webServer> <rewrite>...</rewrite> ... </system.webServer> section within the web.config, but i get a warning, that within the system.webServer the element "rewrite" is not allowed. How can i con...

How do I handle events from an object saved as a property of a user control?

I have an aspx page that contains a user control. The user control displays a business object and allows the user to edit the object. The user control has a property that holds the object being displayed. Public Property Item() As Widget Get If ViewState("Item") IsNot Nothing Then Return DirectCast(ViewSta...

Using AjaxToolKit for improve WebForm Login

Hi again, i find a way, maybe the less cost and time investment, so I choose AjaxToolKit for build an WebForm Login, by the way before starting, is anyones gets problems trying to do it? Im planning to use DropShadow Extender and RoundedCorners with Panels, this will be my first time to work with panels, please check this link: i want to...

ASP.Net Upload of multiple files after choosing them from jQuery

I have used a jQuery multiple file upload control [ MultiFile from fyneworks http://www.fyneworks.com/jquery/multiple-file-upload/#tab-Overview ] to collect some filenames but can't work out how to upload them on the server. The standard asp:FileUpload control only seems to allow single files and I don't want to use the swfupload contr...

Bind an ObjectDataSource to an existing method in my Data access layer

I've seen the designer code, and I have seen code which builds the ObjectDataSource in the code-behind, however both methods communicate directly with the database via either text commands or stored procs. This seems like unnecessary code duplication to me since my data access layer has a method already which returns a datatable with the...

user.identity.name becames Blank after a while

does anyone know why user.identity.name becames blank after a while about (10 mins), i am using .Net Framework 1.1 Edit: Session Timeout is set to 20 min no timeout is set under system.web/authentication/forms in web.config Thanks, Oscar ...

How To Update Data With Linq By Attach Method

I have a update method in my data layer such this: public clacc datalayerSec_User private objUIData as new UIData Public Function Update(ByVal objUser As SEC_USER) As Boolean Try objUIData.SEC_USERs.Attach(objUser) objUIData.Refresh(RefreshMode.KeepCurrentValues, objUser) objUIData.SubmitChanges(ConflictMode.ContinueOnConf...

How does one effectively allow multiple users to access an ASP.NET application on a single machine?

We have two types of user - those that move around the building and access the app with PDAs on a wireless network, and those that are deskbound. Occasionally, a mobile user will try to use one of the deskbound users PCs to access the app. This can often result in data and pages bleeding between the two users. Modifying user behaviour i...

Dealing with application redesign

I am working on a project to redesign/ redo an application. The problem is that the old application was written in ASP.net 1.0 and the database is pretty large over 100 tables and 300 odd views.The database handles roles and membership in a very shoddy way. It involves a simple workflow too. The app is pain when it comes to maintainence....

Hierarchical Filtering in ASP.NET Dynamic Data

I'm trying to create a simple system to keep track of how long I spend on certain tasks (creating a new control, modifying a report, etc) using ASP.NET Dynamic Data. I've got a hierarchical structure to the database where a Project has many Assignments, and an Assignment has many Tasks. When I go to create a new Task through the Dynami...

How to persist List<T> property in ASP.NET Custom Control?

I have the following property in a custom control: List<myClass> _items; public List<myClass> Items{ get { return _items; } set { _items= value; } } In my codebehind, I add items to the collection as in... myCustomControl.items.Add(new myClass()); However, these are not persisted across postbacks. What is the proper way to...