I'm working on an ASP.NET MVC project and I've come to the point where I want to start considering my caching strategy. I've tried to leave my framework as open as possible for the use in caching.
From what I heard during Scott Hanselman's podcast StackOverflow.com uses page output caching and zips that content and puts it into RAM. T...
I can't seem to figure out why this does not work below. I need to bind the text box to a value from an inline expression. Seems like a simple thing right? But neither of these work. Any ideas? Thanks in advance.
<asp:textbox id="tbName" runat="server" Text='<%# Eval("test") %>' />
<asp:textbox id="tbName" runat="server" Text='<%= "test...
Lets say you are working in SQL 2005 with a copy of Northwind database installed.
Your working on an ASP.NET application with an Employees "browse" page.
At the top of the page you have a "Title" filter where you would like to display these 5 choices in a dropdown:
[ALL]
Vice President, Sales
Sales Representative
Sales Manager
...
One of my applications uses sql session state, the timeout is currently set to 20 minutes. My question is, since this is stored in the database and not in server memory, I should be able to increase the timeout without any significant performance issues right?
I dont really understand the importance of the timeout for the database sess...
I created a custom Membership provider (Membership ToolKit) and added methods like:
public MembershipUserCollection GetAllUsers(string applicationName,
int pageIndex, int pageSize, out int totalRecords)
{
// Returns MembershipUserCollection
}
Methods like these help in managing the entire Membership data storage for all applicati...
I am trying to display a 'Software Release' table in an asp.net dynamic data site. The Release table has a build number stored as three int fields (Major, Minor, Build). I'm using EntityFramework, so I have an EF model bound to my database schema. In my dynamic data site, I want the build number to show up as a single field (Major.Mino...
Folks,
I am having a devil of a time with a custom control. The control is very simple - it just displays a list of "StepItems" (rendered as table rows), each with an icon. When I first drag it onto a page, and add StepItems to its collection, it renders perfectly. If I provide some text for its Header property, that also renders per...
I have three radio buttons on a form - A, B, C. Each of these selections populates a dropdown list with data specific to the option. When the form loads, I set option A to be checked (as the default).
When I select buttons B or C, the AsyncPostBack triggers fine and the dropdown is populated. BUT, subsequently selecting A from either B...
Please look at this code
when it goes for ExecuteScalar it gives an error :
NullReferenceException
I tested it inside sql server and it worked
selectedPassengerID = 0;
//SqlCommand command = GenericDataAccess.CreateCommand();
// 2nd test
string connectionString = "";
SqlConnection conn;
...
I am developing a form using all asp:textbox and asp:label. Currently, I am using the RequiredFieldValidator to validate text boxes and display an error inline. What I am trying to do is to change the color of one of the asp:labels after validation fails for one of the textboxes fields. Would I accomplish this with javascript, or is ...
I'm using an asp.net repeater to create a bunch of images. The image markup is all the same so the standard <ItemTemplate> is fine.
However, I want to wrap K images in a div. Lets say I bind 25+ images to the repeater and I want 5 images per div. How do I go about conditionally creating the start and close tags for the div?
Is this a...
I have a textbox control Super1 in my MasterPage.
I am using javascript to access this control from my content page like this:
<asp:Content ID="ContentPage" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
function Somethin() {
{
document.forms[0].elements['Super1'].valu...
Currently developing an ASP.NET WebApplication with VS2008. I stopped development for a few weeks, and when I came back, my project is exhibiting the following problem:
The whole project compiles fine (all targeted to Framework3.5SP1). However, when I launch it (with ASP.NET Development Server), I get a message (from the browser) that t...
Hi!
I need a way to read a Excel file from a stream. It doesn't seem to work with the ADO.NET way of doing things.
The scenario is that a user uploads a file through a FileUpload and i need to read some values from the file and import to a database.
For several reasons i CAN'T save the file to disk, and there is no reason to do so eig...
Hi,
I'm wondering if someone can point me in the right direction. I've got an ASP.NET web application. And there's autogenerated portion of JavaScript in every page that handles postback. Sometimes that javascript is surrounded by
<[CDATA[ ... ]]>
, while on the other machine it may be enclosed in simple HTML comment like
<!-- .....
I'm trying to get an ASP page to work, but it keeps blowing up. How do I get it to display "response.write" info instead of blowing up?
p.s. I noticed this as a technique and plan to give it a try.
On top of page ad On Error Resume Next
After each line of code use
If Err.Number <> 0 Then
Response.Write Err.Description
Err.Clear
End if...
Hi,
If you distribute a .net web application, and you want a certain module of the application to be disabled, AND you don't want to ship the source with it, is it a reasonable solution to just not include the necessary .dll for that module?
I know you can do things programatically, but as long as you don't ship the .dll things should ...
I'm using the new asp.net chart control within a user control. I tried to use the output cache directive to cache the user control for 30 seconds. The caching is custom depending on the logged in user.
The chart data is being lost while the control is cached. I see the chart one every 30 seconds but at no point inbetween. Am I missing s...
I am trying to join a select disinct statement to a select sum statement. Here is an example of the data
CD STDATE ENDDATE PR
F1 01/02/09 01/04/09 $10
F1 01/02/09 01/04/09 $40
F1 01/02/09 01/04/09 $20
F1 01/02/09 01/04/09 $30
F1 01/22/09 01/26/09 $10
F1 01/22/09 01/26/09 $50
F1 01/22/09 01/26/09 $20
My desi...
My question is fairly generic and I know there might not be an 100% answer to it. I'm building an ASP .NET web solution that will include a lot of pictures and hopefully a fair amount of traffic. I do really want to achieve performance.
Should I save the pictures in the Database or on the File system? And regardless the answer I'm more ...