asp.net-2.0

Programmatically set height/width of image from database.

I'm having trouble consistently setting the width and height of an img tag. The img src is pulled dynamically from a database. The images being pulled from the database can have varying widths and heights so I need to set the img control. Sometimes the width and height are set properly and sometimes they aren't. I can't figure out why. A...

How can I update the index of a Multiview with Javascript in ASP.NET?

I am trying to create a ASP:Multiview which contains 3 views. I want to change the index value using Java script, because if I make any ASP:Button then it will refresh my page, so I don't want to refresh my page and change the Multiview's index value. thanks But I want it in javascript, Because when i click at that time it will be chan...

How do I solve this error in my application when I put it on my server?

When I deploy my ASP.NET application to my server I get this error: add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" I have installed IIS and AJAX but this error occurs anyway. What am I doing wrong? ...

How do I know when the browser is being closed?

I am writing an ASP.NET application that tracks the user's scores and info (it is a training application) to an access database, if any one closes the browser directly I want to display an alert message. My problem is that I cannot use the unload event because When I pressed any ASP.NET button at that time unload event occurs. What even...

Can i host WPF Controls in ASP.net 2.0 or sharepoint ?

This may seem like a high-level question. But that is because I'm unfamiliar with cutting edge ASP.net and even less with this behemoth called Sharepoint. So please bear with me.. First off is it possible to take functional custom WPF controls which contain certain unmanaged subcomponents that do DirectX rendering (for performance reas...

Create a cache dependancy on a folder and its sub-folder

In ASP.NET I would like to store an object in the cache which has a dependancy on all the files in specific folder and its sub-folders. Just adding the object with a dependancy on the root folder doesn't work. Is there in any reasonable way to do this other than creating a chain of dependancies on all the files? ...

when running asp.net project I get: Internet Explorer cannot display the webpage

hello, I recently installed vs2005 with sp3.5 on a new vista computer. Never had Visual Studio installed on this computer. whenever i'm building a web project, i receive the following: "Internet Explorer cannot display the webpage". I can't run any of my projects... Thanks ...

capturing the enter key on textbox in asp.net for windows ce

Hi everybody, I want to capture the enter key on text for windows ce msie6.0 but there is no button for that so i cannot use default button property for the form tag itself. What else i can do to capture the Enter key? Thanks.. ...

Excel dll for Microsoft.Office.Interop.Excel

We want to use Microsoft.Office.Interop.Excel in our web application. Everything works fine on our local machines, but on our test machine we're running into problems. It has neither Visual Studio nor Office installed on it. We're using .NET framework 2.0 and the server is running on Windows Server 2003 with IIS6. Is there a dll that ...

Users being forced to re-login randomly, before session and auth ticket timeout values are reached

I'm having reports and complaints from my user that they will be using a screen and get kicked back to the login screen immediately on their next request. It doesn't happen all the time but randomly. After looking at the Web server the error that shows up in the application event log is: Event code: 4005 Event message: Forms authentic...

Manually setting a GridView's PageCount when DataSource doesn't return full result set?

I'm trying to figure out ASP.NET's GridView pagination mechanics so I can use the framework's native functionality instead of my company's home-brewed manual pagination routines which take a lot of work to implement. I've figured out everything except how get the GridView's PageCount property to work with our web services. Currently, ou...

Calculate StartDate and EndDate for This Quarter and Last Quarter

I need to calculate a StartDate and EndDate of a current Quarter and the previous Quarter in vb.net. ...

Caching a user control in ASP.NET ??

I have created a user control in my application "header.ascx", I am pasing a selectedMenu attribute to this control on which the control selects the selectedMenu value specified. Suppose, I have passed value "home" or "search" then it will select (highlight it) the search menu. I want to cache this control, When the value of the selecte...

Identifying Between Refresh And Close Browser Actions

When we refresh the page (F5, or icon in browser), it will first trigger ONUNLOAD event. When we close the browser (X on right top icon),It will trigger ONUNLOAD event. Now when ONUNLOAD event is triggered, there is no way to distinguish between refresh the page or close the browser. If you have any solution then give me. ...

What's the performance difference between HttpModule and Global.aspx ??

I have made a web app where I am using a module which redirects without "www" urls (http://example.com/) to with "www" urls (http://www.example.com/). But as I am on shared hosting server, where I don't have permission to implement a HttpModule, then I tried the same module code with Global.asax file. That works! I used the following (A...

How to get without "default.aspx" url ??

I implemented a following code in Global.asax file of my web application. void Application_BeginRequest() { string rule = ConfigurationManager.AppSettings.Get("WwwRule"); HttpContext context = HttpContext.Current; if (context.Request.HttpMethod != "GET" || context.Request.IsLocal) { return; } if (cont...

Why CSS files not loading when compressing HTTP response using GZipStream ??

I am developing an application using asp.net 2.0 (C#), in which I am trying to implement the compression of my files, so that performance of my website will improve. For that I have added a code in my Global.asax file to compress all requests (.aspx, .js, .css) But when I am running my application it works well for first time then the C...

User created Validator wont call Client side validation Javascript on 'complex' user control.

Hi All, I have created a user control (from System.Web.UI.UserControl), and created my own validator for the user control (from System.Web.UI.WebControls.BaseValidator). Everything works ok until I try to get the user control to do client side validation. While trying to debug this issue I have set 'Control to Validate' to a text box ...

Custom dropdownlist with items autopopulated

I have the need for a dropdownlist with the U.S. states in it. I could need this dropdownlist on various pages. Instead of always having to create a listitem for each state, I want a simple control. I don't want a UserControl - I want to extend the existing dropdownlist control. I know I have done this before at a previous employer, ...

Can you view the XML generated by .Net when using a JavaWS service?

Does anyone know how I can view the XML being sent to a Java Web Service from a C# based ASP.NET page? I've created a disco object web ref in .Net from my Java WSDL but when I use the likes of Fiddler to view the XML attached to the HTTP request, instead I see the form parameters being passed. Is there anyway I can view the serialized X...