asp.net

Entity Model and binding Label to an unrelated table

I am trying to figure out the best way to bind to an unrelated table in .Net. I have an ADO .Net Entity data model which contains several related tables and a few unrelated tables. For example, I have the following tables: KEY_VALUE_LKP with columns LKP_TEXT, LKP_VALUE and LKP_TYPE REQUEST_DET with columns REQUESTNO, USERID, and REQ_S...

Custom Checkbox list control Error in asp.net. "startIndex cannot be larger than length of string"

I am creating a custom checkbox control to add a div after each checkbox in a checkboxlist. The class is below. Imports System.Web.UI.WebControls Imports System.ComponentModel Imports System.Globalization Public Class MyCheckboxListCheckBox Inherits CheckBoxList Implements IRepeatInfoUser Protected Overrides Sub RenderItem(...

JavaScriptSerializer.MaxJsonLength exceeded. What's the best practice for handling this?

I've got a large amound of data I'm sending down to the client using jQuery's $.ajax() function. I'm calling a method in a ASP.NET web service that returns the JSON data. Everything is great for most searches, but when I've got a large data set to return I run into a issue with the JavaScriptSerializer MaxJsonLength property. What's the ...

ASP.NET Authenticaion and Security with Session

I'm building an intranet ASP.net web application that unfortunately cannot use the built-in membership features because all the users and logins are stored on the company database. It will use Windows authentication and match against this. I'm planning to have my own "users" table in a separate database that will handle access privileg...

Repeater with paging through ObjectDataSource

Is it possible to implement custom paging for repeater using ObjectDataSource's: EnablePaging="true" MaximumRowsParameterName="maximumRows" StartRowIndexParameterName="startRowIndex" SelectCountMethod="TotalNumberOfProducts"> Or I must set all values in code behind and pass the to ObjectDataSource's parameters: <SelectParameters> ...

CS0234 error with System.Linq namespace in ASP.NET

At my company, we have tiered environment for our web applications (development, staging, production). I made a bunch of changes to one of my applications and deployed them to the development environment (Windows 2003 w/ IIS 6.0). I also had to make an immediate change to one of the user control files that needs to fix issue with the c...

Datalist line break when records with same ID detected

Kinda hard to explain, but i'll try. I have a datalist that is populated by a call to a stored procedure. The thing is, when rows with the same ID is detected i want it to break and add it under the first record and so on.... Illustration -- > Stack [23,45,566,676,787,878,23,23] (these represent record ID's) 23 23 23 45 and...

Streaming large file uploads to ASP.NET MVC

For an application I'm working on, I need to allow the user to upload very large files--i.e., potentially many gigabytes--via our website. Unfortunately, ASP.NET MVC appears to load the entire request into RAM before beginning to service it--not exactly ideal for such an application. Notably, trying to circumvent the issue via code suc...

Securing ELMAH while yet making it possible to access it via RSS Reader

We use ELMAH error exception logging in our application. I'd like to keep ELMAH secure from regular users while still making it available to administrators/developers of the application. When you set security with forms authentication in the web.config you then lose the ability to access the RSS feed. I'd like to be able to secure EL...

ASP.Net on Linux

Hi everbody, I want to use ASP.Net on Linux because of license problems and costs. Can you compare its performance? We coded a few asp.net applications and work well on windows server, can we migrate to linux + apache + mono without any changing? Framework version is 2.0. ...

set the height of freetextbox

How should I go about setting the height of freetextbox? I want to size the textbox reasonably based on the lenght of the text in the textbox. ...

AjaxPro and OnTimeOut error

Hi, I am getting the following error on my AjaxPro project: Error: this.onTimeout is not a function Source: http://localhost:3405/ajaxpro/core.ashx Line: 407 I know it is something to do with the release of AjaxPro, but does any of you have a version which doesn't contain that error? Or how can I correct it? I have downloaded the la...

ASP.NET - Swap TextBoxes for Labels when Enabled=False

The setup: Web form with lots of TextBox controls. When I set any one of the TextBox control's Enabled property to False, I'd like to "swap" that TextBox out for a label at runtime. The idea here being if it's read only anyway, don't display it in a control designed for editing. I'm thinking this should be pretty simple and reusable, b...

How do I add Page Events for ASP.NET in Visual Studio 2008

This is a bit of a Visual Studio question. I feel with all the helpful Intellisense there should be something to assist but I can't seem to find it. I made a page with a codebehind in ASP.NET C# in VS2008 and it autogenerates a PageLoad event method, of course. Well, what if I want to add methods for more events besides PageLoad? I w...

"#if DEBUG" in an ASPX/ASCX page

I want to be able to point to one of 2 assemblies based on what mode (DEBUG or RELEASE) I have selected in my VS2005 IDE. Something like this (which does not work): <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VideoDialog.ascx.cs" Inherits="Company.Web.Base.Controls.VideoDialog" %> <% #if DEBUG %> <%@ Register TagPrefi...

Is it possible to add a UserControl to a Composite control?

I'm trying to build a CompositeControl that's flexible. Depending on some of it's parameters, I would like my CompositeControl to load different user controls in it's CreateChildControls method. The exact UserControls aren't know at design time. Just as a quick example, I tried with a "hard coded" UserControl and it failed: protect...

jQuery validator plugin without using form

I have multiple section is asp.net that submits data in chunk and i want to use jquery validation plugin, but issue is that asp.net wraps everything in form and child forms not wokring right and technically incorrect. So only alternative is forget about form and implement validation for divs. But all sames i see are using form. As not b...

Adding unit testing to an existing asp.net web forms application

I have an existing asp.net webforms application that I would like to add some unit testing to but am unsure of exactly how to go about it. The application is database driven with functionality I guess you could compare to an advanced forum. Logic, data access and presentation are seperated for the most part. What methods should I be te...

How can I read text from cache into user name field of ASP.NET login control

I have a primary ASP.NET site that asks for a user name. When the user gives a user name and clicks the submit button, he/she is redirected to the respective application (actual site) based on their user name (user name goes into cache here). User names across all sites are unique. I want to use the cache to read back the user name en...

Twice postback in ASP.NET

Hi, My page is fully postback twice. I am using master page with AJAX. The structure of master page is as follows. +---------------------------------------------+ | Web User Control with AJAX Tab Control | +---------------------------------------------+ | | | | | Col1 | ContentPlaceHol...