asp.net

Help getting GB - US date conversions working in asp.net vb

My site is set to en-GB in the web.config. I have a calendar extended textbox control on a page which lets the user select date, in GB format as string (DD/MM/YYYY). I need to convert this to a US datetime before inserting into db. solution: (MM/dd/yyyy hh:mm:ss) I do hate mondays. Overthinking as usual. ...

File download via external link - how to implement?

Hello, I have a web application which consists of many aspx pages ... one of them shows a grid with rows that can be exported to a file via button click. This works fine. Now I want to have that feature which allows a user to access an external link to this page (or another) and to export to a file and download. I dont need any informati...

Better than TreeView

I'm binding a lot of data to a TreeView control as the data is a natural category hierarchy. The problem is that there is a lot of it. I have managed to remove a lot of the overhead by only binding those nodes which appear in the visible tree, but this still leaves a lot in the ViewState, et al. Does anyone have a method or alternative ...

WebRequest giving 301 XML document not valid when Curl worked fine

I am trying to send an xml formatted document that I create to a phone and I keep getting a response back of 301 XML document not valid. I went on the W3C website and tested the string and it seems fine... here it so people see it. I was using php orgionally with cURL and here is what that looked like. XMLData = urlencode($X...

TabStrip control for ASP.NET

Is this still available? I am unable to find it when I try to add it to my Toolbox. ...

selecting gridview rows using ctrl key

I need help for selecting multiple rows in a gridview using ctrl key. (C#, asp.net) While right clicking on the selected rows, I need to export those particular rows to "word". ...

How do I create an ASP.NET website to search MLS or IDX listings?

How do I create an ASP.NET website to search MLS or IDX listings for a real estate website? I'm assuming there is a C# library to do this? I'm curious about any pitfalls or unexpected expenses people have ran into in using these services? ...

ASP.NET role information not being persisted

I have an ASP.NET webforms website that uses the .NET MySql connector and MySql as a back-end. I'm using role-based authentication to protect certain areas of my site. The problem is that the user's role information is not being persisted after I move my site to the server (works fine on my local development machine). What is happening i...

Create custom controls dynamically in ASP.NET

I want to create custom control (let's name it DesignPanel) that will allow user to design his own webpage structure that would be stored in a sitemap file. This Design Panel will have child controls inside ( SiteElement). User will build page strcture by connect Site Elements, customize them ( like change name) and add new ones. This l...

web user controls have made my default page so heavy

Hi folks  my web site structure is like this :     1- master page with stylesheet and scripts     2- aspx which render (number 3)     3- web user control and scripts inside them  in the number 3 I have some javascript that are call some ajax method they are about 20 lines code and I can not move them to js file in order to using <%= my...

Percentage regex

Just a quick one here, does anyone know of a good regular expression for a percentage? Including 2 decimal places, i.e. 15.22%. I'm looking to put it inside a regularexpressionvalidator in ASP.NET. Thanks ...

Best practice for profiling web pages

Hello, I am trying to profile pages in my application. I would like to ask for best practices to follow to do this job either at an early stage by the developer using tools as Chrome Developer tool at the staging phase by using third party tools and methods Which are the best way to do this? What are tools available? ...

asp.net FileUpload control works on server but not for clients

Hello all, I have a strange thing going on with the .net fileupload control. If I remote desktop to the server that houses the web app and db server, I am able to upload files and store them into a varbinary(max) column. However, when clients connect to the web server from their desktop, then can do all the things they need to such as...

Deploy SQL Express in App_Data directory

Despite using many sql databases before, I've never actually tried to develop an app with a database in the App_Data directory. Until now!! It's a small WCF service project, which has a sql express 2008 r2 database. Working in VS there are no problems, I thought it would be as easy as deploying to a server (win 2008 with sql 2008 r2 i...

Why am I seeing 2 error pages when doing a Server.Transfer from Application_Error and errorMode="Custom"?

My question is closely related to this question. Here is a quick synopsis: My app is running in Classic Mode. I have the following code in Global.asax protected void Application_Error(Object sender, EventArgs e) { // ... boring stuff... HttpContext.Current.Server.Transfer("~/MyErrorPage.aspx", true); } Eve...

getting null path while uploading image upload in .net

I have used file upload control of asp.net but I am getting empty string while saving.my code- <asp:FileUpload ID="fuProductLogo" runat="server" CssClass="file paddBottom5px" /> .cs code is- if (fuProductLogo.PostedFile != null && fuProductLogo.PostedFile.ContentLength > 0) { ... } but the .PstedFile and .CountLeng...

ASP.NET MVC with YUI

Hi, I am using ASP.NET MVC 2. I have played around you the YUI samples that can be found on http://developer.yahoo.com/yui/2/. I have been wondering if any one has had the time to use the YUI controls in an MVC app? I want to start using the datatable and display my results from a SQL Server in this datatable. How is this possible? ...

How to find duration of an uploaded mp4 or f4v video?

I've tried using directshowlib-2005 by installing k-lite mega codec pack. It can't find the duration of an mp4 file or f4v file (avi, wmv and flv has no problem). I use ImediaSeeking interface of directshowlib-2005 to find duration. But in case of mp4 and f4v the GetDuration method returns zero. I know it is a codec problem, but I do n...

How to convert a DropDownList Value in INT Variable

Hi, I have a DropDownList with a list of value. I need in my code USE the value selected by the User in the DropDownList AS INT DataType (numeric). At the moment I am using this code below (CONVERTING DATATYOES). Script work just fine. But I would like to know if exists an alternative way to do it. I am pretty new in ASP.NET any ide...

Dynamically Created Controls or Static Controls that are Hidden or Shown

I've got a set of ASP.Net pages that display a number of asp:TextBox fields depending on the number of entries in a configuration file. I know that the number of fields won't be going above 10 or so. Given that, should I declare a sufficiently large number of text boxes in markup, or should I dynamically create the textboxes in the cod...