asp.net

Open new window from code-behind

I need to open a new window from code-behind on post-back if a specific radio button is selected. Is there any way to do this? Thank you. ...

ASP.NET partial page upload without Updatepanel /With jQuery

I have an ASPX page .In the Top i am displaying 5 categories (Ex : Pen,Book,Shoe,Mobile,Mirror) When i click on any of the categories,I want to show the products under that category below the header. I dont want to reload the entire page for this.I want to maintain my page as it is (The header,footer and side panels would ) when a click...

Updating a SQL database table with a webservice

Hi I have an issue and I have looked long and hard over the Internet for an answer but cant find anything. I have a little app that sucks in a web service. It then passes this web services results another applications via its own web service and stores the request in a table. What I am trying to do is quickly import the results to ...

asp.net gridview links seem to be "expiring" - how to stop?

I have an ASP.NET 3.5 page with a gridview databound to a generic list of objects. The purpose of this page is to show the user a list of items they're responsible for so they can select one and go to the maintenance page to see the details of that item. I have the "AutoGenerateSelectButton" property set to True. I have no problem whe...

adding runat="server" changes the behaviour of the layout

Hi, I have a page with some controls, usercontrols etc. when I change a div from plain <div id="foo"> to a <div id="foo" runat="server"> the layout complete changes. why is that? and how can I prevent it? I'm using 2.0 .net framework Is it because .net changes my id, which obviously I don't want? ...

How do you tell when IIS is applying the "Default Page" setting in ASP.NET (C#)

I'm attempting to issue a 301 redirect when a user requests http://www.mysite.com/Default.aspx to http://www.mysite.com/ The issue I'm having is that every property I can find within Request (Request.Url, Request.RawUrl, etc) is identical for those two requests. Edit for further clarification: This is on a shared web host, I can't inst...

ASP.Net HtmlTable - any equivilent to <col></col>?

Is there an equivilent in ASP.Net Table or HtmlTable to the <col></col> element set in HTML to apply a style or class to an entire column? Ideally I am looking to do this programmatically for a WebPart rather than in the ASP.Net designer. ...

Passing Hidden Variables in Vb.net

I want to pass a few variables to another page. Currently I'm using response.redirect and passing the variables in the url. I'm not really interested in using Session Variables. Is there a way to pass hidden variables in .NET to a completely different form? ...

replacing multiple identical characters with one in a string

I have a string as follows; dim str as string = "this is a string . " I want to identify those multiple space chars and replace with one space char. using the replace function will replace all of them, so what is the correct way of doing such task? ...

In ASP.NET, how to get the browser to download string content into a file? (C#)

Hi, I would like to create a text file for export/download, like a *.csv, from an ASP.NET application. I know about Response.TransmitFile, but I want to do this without creating and saving a file physically on the server. Is that possible? Has anyone done something like that? ...

Why would I use ASP.NET MVC on a public site and WebForms on an Intranet?

I asked this question: http://stackoverflow.com/questions/894865/is-asp-net-mvc-destined-to-replace-webforms/895400#895400 and a few answers were that if the website were public/Internet to use MVC, but if it were internal to use WebForms. I saw some of the reasons for it but some of them didn't really help me understand why this rati...

AnyCPU ASP.NET control embedded in a 64bit .NET DLL

I have a large .NET library that is currently being built 64bit. Inside that library I have a ASP.NET Custom Control. Since Visual Studio is 32Bit I can't add this DLL to the toolbox properly. I do not want to recompile the entire DLL 32bit since it links against other 64bit libraries, but I was wondering if I could create another DLL...

asp.net: deploying local resources - is embedding possible?

I have an asp.net app with some local resources. These resources are used in the aspx and code-behind files: aspx: <asp:TextBox ID="TextBox1" runat="server" Text="<%$ Resources:testTag %>" /> .vb: TextBox1.Text = GetLocalResourceObject("testTag").ToString If I deploy the .resx files with the app, there are no problems. However, if ...

Dynamically building LINQ query using OR operator in VB

I need to build a dynamic linq query with or operators. I have seen PredicateBuilder but that is in C# and my project is in VB. Basically I need to build a WHERE clause similar to this: Where((this = 1 AND that = 2) OR (this = 1 AND that = 4) OR (this = 2 AND that = 4)) but the problem is the number will have to be determined dynami...

Hosting Silverlight Video Player On IIS 7 Issue

I am trying to host an ASP.NET application that is running the Silverlight Video Player. I have recently deployed this application to a fresh Windows Server 2008 Virtual PC. I have installed the Silverlight plug-in as well as the Silverlight 2 SDK on the server (and the .NET Framework 3.5 SP1). When I try to browse to this site, the V...

ASP.NET/Jquery: document ready in update panel?

I have the following user-control: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="FadingMessage.ascx.cs" Inherits="includes_FadingMessage" %> <asp:PlaceHolder Visible="false" runat="server" ID="plhMain"> <span id="<%= this.ClientID+"_panel" %>" style="background-color:yellow; padding:10px;"> <b><%= Message %></b> </span> <...

Fire event each time a DropDownList item is selected with jQuery

I have a dropdown: <asp:DropDownList id="dropdownid" runat="server" class=blah"/> in my jQuery, I assign change event like this: $('#dropdownid').change(function() {......}); Now, this works when I select different value from the dropdown, however let's say I want to select the same value again. (because I want to make another call w...

Can I change the width of an asp.net button dynamically based on the length of text

I have multiple styles such as button_50 where the width is 50px, button_75 where the width is 75px, and so on... Is there a way to dynamically generate the length of the button based upon the length of the text, so I probably would just have to create one style like button and I can apply that to any button and it would shrink or stret...

Load report failed in Windows server 2003

I have an asp.net application,in which crystal reports is used.When i click on show button i get an error stating "Load report Failed".Application works fine in my local system.i also tried using report.close() and report.Dispose() but no luck.have also set permissions but still same problem.Can any one help me out. ...

Why does visual studio .net 2008 lose debug ability after adding global.asax file?

I do not get the normal error message saying debugging is not enabled red error message. If i remove my global asax file, my code goes to my breakpoint. If i add the file back in, the project runs totally ignoring any break points. Here is the code inside my global asax file Public Class Global_asax Inherits System.Web.HttpApplic...