asp.net

In .aspx, how to pass a value from asp:Repeater to code behind function

So, I want to use jquery to set the text of a button, depending on the value of a property in the current row of a repeater. I need to call a function in the code-behind to map the value to the text the button should have. So, I need to pass to my foo function, the string value of the UserStatus property for the current item in the repe...

ASP .NET 2.0 Control State vs ViewState

Is the new ControlState feature only applicable to custom controls or is it available for the standard server controls as well? That is..can you disable ViewState for an entire page with standard controls like Detailsview, Gridview and would it still work? Does ControlState apply to standard server controls? Or in order to work with Co...

weird slowness in asp.net web app - VS 2008

I compiled my app in release mode. I then went ahead and 'published' the site. Copies all files and moved them to a staging server with a static ip. Restarted IIS. Went to another machine and hit my web site. It took about 4 seconds for just the default page, which is pure HTML with no custom framework usage, to show up. What gives??? ...

What is the most efficient way to filter listboxes based on selections of another in c#?

I have several listboxes that get each of their data from a separate stored procedure. If the user selects an option in 1 listbox, it should filter the other listboxes. I have done this before by adding logic to the stored procedure, but sometimes it seems to get very long. Does anyone know of a better way to approach this? T...

Performance monitor shows 4294967293 sessions active

I have an ASP.Net 3.5 website running in IIS 6 on Windows Server 2003 R2. It is a relatively small internal application that probably serves less than ten users at any given time. The server has 4 Gig of memory and shows that 3+ Gig is available while the site is active. Just minutes after restarting the web application Performance mo...

asp.net - Generate Powerpoint file on the fly

I have a client of my web based application who heavily uses the data from our system for powerpoint presentations. We currently allow data to export in more traditional file types...PDF, CSV, HTML, and a few others. Powerpoint doesn't seem to be really automated. Is there a way, on the ASP.NET server side, to automate the creation an...

Deploying .PDB files in IIS. Any benefit?

I am deploying ASP.NET and Web Service solutions to IIS for a development server. It looks like the last person that did this job deployed all the .pdb files too. I asked about it, and was told that they "provide better stack trace info in the logs" if they are left on the server. Is there any truth to this? I've always left them behind...

Gridview HTML row ID incorrectly created

All, When my gridview binds to its datasource (set programmatically) and generates the HTML, the row ID's are coming out in the HTML as the same for every row ... i.e. they are not unique. I expect this: <select name="ctl00$ContentHolder$list$ctl03$EquipmentTypeList" id="ctl00_ContentHolder_list_ctl03_EquipmentTypeList" style="width:16...

Question about Copying vs Publishing website

I would appreciate opinions or suggestions. For several years, I have had an html and javascript website that was housed on a shared Apache server hosted by Wild West. Recently I decided to migrate it to .NET 3.5 and put it on a shared Windows IIS7 server also hosted by Wild West. I rewrote all of the pages using Visual Studio 2008,...

Do you precompile your website and why/why not?

I'd like to get the pulse of the community on whether to precompile or not. I know its cold start time is faster, and it hides code. However, there is something dirty about it, IMO. Maybe its the name, compiling a website sounds incorrect. In general how are you deploying web apps? ...

Easy way to simulate Invalid Viewstate?

Is there an easy way to simulate Invalid Viewstate? ...

Splitting / Modularizing Large ASP.NET Web Application Projects

Our company has a fairly large ASP.NET web application. The app is already broken up into distinct 'areas' of business functionality. I'm looking for some strategies we can use to split this web application into separate buildable/versionable modules. Primary goal being to: Enable us to deploy the web app with only select areas of func...

Insert Parameterized Query ASP.NET MS SQL

Here is my SQLCommand object: oCommand.CommandText = "INSERT INTO hits (id,client_id,client_ip,page,vars) VALUES _ (@@IDENTITY,@client_id,@ip,@page,@vars)" oCommand.Parameters.Count = 4 >> oCommand.Parameters.Item(0).ParameterName = "@client_id" >> oCommand.Parameters.Item(0).Value = "123456" >> oCommand.P...

AJAX Asp.net AutoCompleteExtender interpreting string 0010 as octal

I'm using the MS AJAX AutoCompleteExtender on a textbox. It's working fine, except when the web service returns strings like "0010" -- in which case, it displays "8". I eventually realised it was interpreting the string "0010" as an octal number (and then proved the point by adding strings like "0100" and "0x10".) How can I prevent thi...

Somewhat strange .NET error involving datetime

I am getting this error on a remote server, but the same code executes fine locally. Please refrain from saying it sucks, or giving me your rant on dynamic sql, I didn't write it, just trying to figure out why it's throwing an exception. The highlighted error is line 56. Protected Sub drpDateRange_SelectedIndexChanged(ByVal sender As Ob...

LinkButtons not working in ASP.net/C# app production deployment

Hi all I'm running into a situation where link buttons are not responding on a gridview control in one of my apps deployed on a production machine. Not sure exactly what's going on. The problem is very similar to this one although I've examined the output html on the page and it looks reasonable. Any thoughts/suggestions would be grea...

How to access a user control in a masterpage from a content page?

Lets say that I have a header user control in a master page, and want to change a property of the user control depending on what content page is loaded inside of the master page. How might I go about this? Thanks! ...

ASP.NET Impersonation and SQL Server Trusted Connection Calls

I am working on an ASP.NET page that we, in code impersonate the requesting user. We are using the following code to start impersonating. Dim impersonationContext As System.Security.Principal.WindowsImpersonationContext Dim currentWindowsIdentity As System.Security.Principal.WindowsIdentity currentWindowsIdentity = CType(User.Identity,...

Is there a way to find out if a web service has security?

I've got a web service: http://machine001/Services/conversionService.asmx This web service has one method in it called convert(string pInput). I am trying to find out if there is a way to figure out, without logging into machine001 and without actually calling the convert method, if this web service has security applied. If I am able ...

Web Deployment Project builds files that are no longer part of the project

This is the error I get: Error 101 Could not load type 'control'. /Test.vbproj/x.ascx 1 1 WebDeployProject This is a left over file that was part of the project last week, but one of the developers deleted it from the project. I have to manually delete the file in order to get the WDP to build. Is there a way to tell the WDP...