asp.net

FormsAuthentication isn't preserving the UserData field after Postback in .NET 3.5

I've created a FormsAuthenticationTicket from scratch, but found that when retrieving it at a later time, the UserData isn't coming back. Here is the code used: FormsAuthenticationTicket ticket = new FormsAuthenticationTicket( 1, user.UserId, DateTime.Now, ...

Accessing datatable from different methods

Hi, I am creating a web application with back-end on ISeries. In the page load I am populating a datatable and using it as a datasource for my gridview. What is the best possible way to access the data in the datatable from other methods, on the same page? And in other pages? The way I do currently is to get data from the gridview and...

ASP.NET Application lag after post back

When running my application lately, there is a very long delay after a request is made to the server. When debugging and stepping through, the code finishes quickly and then a dialog comes up, which I'm assuming is the reason for the lag. (I've tried a series of other options including disabling usage of ViewState, disabling debugging,...

c# Get object property from ArrayList

Can't figure this one out I have an ArrayList of classes: // Holds an image public class productImage { public int imageID; public string imageURL; public DateTime dateAdded; public string slideTitle; public string slideDescrip; } public Ar...

Has anybody had any experience with getting Uploadify file uploader to work within an asp.net updatepanel

I'm having problems getting Uploadify to work in an ASP.NET UpdatePanel. I'm not getting the "Browse" button displayed and so am unable to select any images for update. It works perfectly outside of the UpdatePanel proving I have hooked everything up correctly. Any Ideas ? ...

Is there a client side event that occurs on a user control when its parent submits to the server?

Is there a client side event that occurs on a user control when its parent submits to the server? ...

How to hide the inner controls of a UserControl in the Designer?

I have a UserControl that contains a DropDownList and an ObjectDataSource. That control is used in the markup of my MasterPage. In the Designer of a ContentPage that uses that MasterPage I can see the DropDownList and the ObjectDataSource. See for yourself. I know that other controls (like ComponentArt:Grid) only show themself as oute...

Validator throwing error.

I have the following RegularExpressionValidator on one of my pages: <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="InKindTextBox" ErrorMessage="The value entered for 'Cash' must be in a number format. Ex...

Global asax file removal error

I added a global.asax file, and later decided I didn't need it, so I excluded it from the project, but now I get a parser error when I attempt to run my project. What happened and how do I fix it (besides the obvious of adding it back to the project)? ...

this._form is null error with ScriptManager and Ajax Control Toolkit

I'm using the Ajax Control Toolkit with .NET in VS2008 to put a Rating control on my page. I've got the scriptmanager on the page and the rating control works in Chrome and IE but not Firefox. In Firefox it gives me this error "this._form is null". I've got no other scripts included on the page. There are a couple included in the master ...

ASP.NET Form Field Security using Attributes

I'm looking to implement something similar to this article: http://msdn.microsoft.com/en-us/library/aa480723.aspx One of the issues I have though is that I need to apply custom System.Attributes to the controls defined in a FormView ItemTemplate and EditItemTemplate. How can I modify the declaration of those controls or apply the custom...

DataKeys dataList

Hello, This is my bare DataList definition :- <asp:DataList runat="server" ID="dtltrial" ondeletecommand="dtltrial_DeleteCommand" DataKeyField="PhotoId" > </asp:DataList> where PhotoId is my primary key of table and so i have given it as datakeyField. However i also want AlbumId along with DataKeyField. How do ...

Dynamically add columns to Gridview using different datasource than what is bound

Tell me if this is even possible: I have a gridview bound to an ObjectDataSource providing me with data from a database. I'm filling the Objectdatasource using Linq-to-entities. Typical setup where I'm supplying the columns and rows. Below I have a horrible graphical representation. x_col x_col x_col x_row| x_data ...

Wizard.LayoutTemplate and TemplatedWizardStep still renders a table

For some reason, I can't seem to create a Wizard control using TemplatedWizardStep that doesn't render an outer table. As far as I'm aware, in .NET 4 if I'm using a LayoutTemplate I shouldn't expect a table. As an example, I've taken the code from here and extended it a little: http://msdn.microsoft.com/en-us/library/system.web.ui.webco...

C# Looping Question

Below is my code: protected void SubmitCSV_Click(object sender, ImageClickEventArgs e) { //Check Routes File Uploader for file if (ImportCSV.HasFile) { //Get File name string fileName = ImportCSV.FileName; //Read CSV StreamReader ReadUploadedFile = new StreamReader(Im...

Caching a server side user control in asp.net

Hi, My asp.net app is heavily using user controls and is high load; my concern is that loading user controls for every request (Page.LoadControl(controlPath)) is sub-optimal at best. I was thinking of caching an instance of loaded user control in HttpRuntime, but I don't know how's it going to behave when multiple connections (threads) ...

message box problem

i wanna to show a message box but i prefer to be server side ,i wanna to have full control over it,i mean the number of buttons, the icon .... etc like windows application. the problem when add reference to system.windows.forms and use it , when publish the site on the server i have an error , i can't remember exactly , but when remove ...

Binding LinqDataSource from code-behind to Gridview

i have a grdidview control on the .aspx page and i am trying to connect dynamically from code behind and bind the gridview but somehow it throwing me an error... what is wrong with this code? any help? LinqDataSource LDS_POReport = new LinqDataSource(); LDS_POReport.ContextTypeName = "DataContextDataContext"; L...

What would be the ideal way to do paging using a Infragistics WebDataGrid and SQL Server 2008

We have an application that is growing in users and the infragistics WebDataGrid and stored procedure are having performance issues. I'm looking into adding the ROW_NUMBER() function in the stored procedure, but I'm concerned with sorting. It looks like I would need to do change the procedure to have a dynamic order by case statement i...

ESRI: ADF + Geodatabase

Hi, I'm a .NET Develop. I'm using ESRI / ADF and I have a problem whit some methods of Geodatabase. On the beginning of development I needed connect on GeoDB and execute queries. On this moment I got this error, ACCESS DENIED: (Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) So I solved this, creating my IWorksp...