asp.net

Can't debug ASP.NET in VS2005 won't stop at break point

I have an puzzling problem. I have a new ASP.NET web application in VS2005 that runs fairly well, but I am having a problem and would like to set a break point to see what is going on. I have compiled the project in Debug mode. I have debug=true set in the web.config. But it appears that the IDE is not attaching to the process at all...

How to show GridView during Page_Load ?

Hi all, I have a gridview that normally loads when a user clicks a View Report button. However, I now want to show the gridview while the page loads. I tried calling the following method from the Page_Load event: protected void btnView_Click(object sender, EventArgs e) { try { grvReport.DataBind(); ...

ASP.NET, what is a datagrid bound to after postback?

I have a gridview full of telephone numbers. To populate the gridview I bind the gridview's datasource to a List<> of telephone numbers. I do this when the page is first loaded, but not on postbacks. I want the user to be able to delete some of the telephone numbers, and then, if they want, click a Save button, and this will update th...

How can I zebra stripe a gridview that uses jquery tablesorter?

I have an asp.net GridView that I use the tablesorter on: $(document).ready(function() { $("[id$='_myGridView']").tablesorter({ sortList: [[0, 0]] }); }); How can I apply zebra striping that re-stripes when re-sorting? Edit: As @Chetan Sastry pointed out, it's as simple as: $(document).ready(function() { $("[id$='_...

Showing the picture a user just picked?

Our webform has a file upload, and just a regular picture box on it. Now we already have the code to save the pictures and retrieve them, but how would you display the picture they selected without first saving it, then refreshing the page and displaying it? Is this a javascript thing? Thanks in advance. ...

GridView RowCommand problem

I have GridView on my ASP.NET page and I have set OnRowCommand="gdvCar_RowCommand" OnRowDataBound="gdvCar_DataBound" for my grid. In gdvCar_DataBound I add three buttons, but when I click on them it goes to PostBack but doesn't come in gdvCar_RowCommand at all and that buttons disapear. Does anybody have same problem or have idea what is...

ASP.NET Custom errors for developer machines

Does this ever happen to you? You are sitting at your development machine and you are made aware of an unhandled exception in a deployed asp.net application. You visit the deployed web app. You can't see the exception detail in your browser, because custom errors is set to remote only. So you have to login to the web server and instigat...

Request.Browser Changed for Firefox

My code looks at the browser you are using to see if you have a correct browser to run the website (I know, I am getting rid of it). The site has ran fine until today. The code looks is: Request.Browser.Browser.ToLower().indexOf("firefox") When this == -1 then I get sent to a page saying "please upgrade". Like I said, this used to ...

Binding a Button click event in code behind

I'm building a button in my code behind file and want to bind the click function to an existing click function of a different button. How do I handle this? I was hoping for something simple like: Button b = new Button(); b.onClick = otherClickEvent(); but apparently that's not doable. Am I missing something here. I'm aware of OnCl...

Binding a Dictionary(Of Integer, String) to the DataTextField property of a DropDownList

I have a State class defined like this: Public Class State Public Property StateId As Integer Public Property Name As Dictionary(Of Integer, String) End Class Name(x) contains the state name in different languages. I get a collection of State from the method StateManager.GetAllStates() and I want to bind this collection to a...

Is there a .NET SDK for Adobe Photoshop/Illustrator/InDesign?

I have a page on my site where a user can upload a Photoshop, Illustrator, or InDesign file. It's for a print shop, and they need to do things like see which fonts are used in the file, check if the file contains spot colors, and other information like the dimensions, resolution, color space, etc. Is there an SDK out there that I can d...

C# converting int to Int64

we are in the process of upgrading our crappy cms system and the new assemblies have changed from int to int64. I'm running into a problem when trying to build now. I've tried casting but it doesnt seem to help. here is one excerpt of code that is causing a problem. IDictionary<int, string> aliases = new UrlAliasApi().GetUrlAlia...

Has anyone experienced an issue with IE8 displaying phantom form border in non-compatibility mode?

Hello SO: I am working on an ASP.NET MVC (framework v3.5) website, and this form page IE8 displays a border on top that looks to me like an empty element with a border floating on top of the form. Here are screen shots: I narrowed it down to the form, because after I removed the form generation code, the line ceased to display. As ...

How to save value across postbacks for a composite control without using viewstate

I have a composite control that has a couple of private fields that reference values in the cache and these private fields are called during the constructor method. Since a string key is used to identify the value in the cache, I must have a way of storing that string key in such a way that it is available at the time the control is ins...

Object with Lazy initialization-adding to Session or Viewstate

I have a two tier architecture based website-data layer and UI layer. I have a web page, I get the id of a customer from the querystring and I build the customer object from that id. I have several tabs in my webpage, so, unless I need the data, I dont have to load the data for the grids which are in the tabs that are not clicked. That's...

Label and Grid view data will not update on the first button next click

Hello, I am using c# .net. MSql server 2005. I got a web application, the problem is that the text in the label and Grid view data will not update on the first button next click, I need to click the button twice, I debugged to code, and I found out that the label does not recive the data until after the second click. But in drop down i...

Forms Authentication - security

Hello, I have the following set up. 2 Web Sites A and B (each has it's own virtual directory). I have written a simple web service (asmx) that reads configuration of web site's A web.config. The .asmx file resides in the WebServices folder of site A. When creating web service reference from site B ran on the same IIS I get this error: ...

How do I override a javascript function that is inside another file?

Hello, I am having a problem with the asp:Menu control. A menu control 2 levels deep does not play well with internet explorer on https. I continually get an annoying popup. I think in order to fix this I need to override a function in an automatically included script file. change this function PopOut_Show(panelId, hideScrollers, dat...

asp.net user identity returns application pool identity

I have a web server farm with 2 windows 2008 r2 server nlb configured. I am trying to get the identity of the current logged in user but instead I get the application pool user. Not sure what I'm doing wrong. any ideas? here's the code I'm using protected void Page_Load(object sender, EventArgs e) { Response.Write(User....

ASP.NET with Quartz.NET

Hi all, I'm currently developing a Windows service that utilises Quartz.NET to perform jobs. To actually input and edit jobs, an ASP.NET page is used on a seperate server (currently, they're just 2 projects in the same solution but they will be on a seperate server in the future). So far I am being lazy and declaring the scheduler in bo...