asp.net

ListBox Inside DataList Control Always Giving the Text of the First Item

I have a ListBox inside DataList control. The Autopostback is set to true in the ListBox. For some reason when I select an item from the ListBox control and I check in the ListBox_SelectionChanged event it is always the First item of the ListBox items. Why is that? I just checked and the SelectedIndex is set to 0 even if I select the ...

CompareValidator currency check does not work with French formatted numbers

I have a salary TextBox and an associated CompareValidator, which is setup as follows: <asp:CompareValidator ... Operator="DataTypeCheck" Type="Currency" /> I fill the TextBox with a formatted string out of the database: txtSalary.Text = myObject.Salary.ToString("N2") When a user accesses the page using a French culture (such as fr...

Framework Similar to ASP.Net AjaxPro

Currently, I'm using AjaxPro Framework (http://www.ajaxpro.info/) to call any methods in my web application from the client side. But users have some serious problems using it. (e.g success callbacks don't work in Chrome. More info about the problems could be found at: http://stackoverflow.com/questions/529711/ajaxpro-is-working-locally-...

Sharing ASP.NET WebApp Url Inside a Network

I thought I would just replace the localhost with my computer and it will work but it does not: http://10.90.108.66/MyWebApplication/Default.aspx How can I make it work so I can share the url? ...

Split C# collection into equal parts, maintaining sort

I am trying to split a collection into multiple collections while maintaining a sort I have on the collection. I have tried using the following extension method, but it breaks them incorrectly. Basically, if I was to look at the items in the collection, the order should be the same when compared to the broken up collections joined. He...

Get domain name on ASP.NET Application_End events

How can you obtain the 'mydomain.com' part of a url within Application_End? ...

ASP .NET HTML.DropDownListFor

Hello, I have this line of code in my view but it doesn't work. It keep throwing this error: The ViewData item that has the key 'Material.Modelo.Categoria.Familia_Id' is of type 'System.Int32' but must be of type 'IEnumerable' <%= Html.DropDownListFor(model => model.Material.Modelo.Categoria.Familia_Id, Model.Familias, " -- Seleccione ...

How to check if a control is child of another control? "Control.IsChildOf"

I have 3 panels: <asp:Panel ID="ParentPanel" runat="server"> <asp:Panel ID="AnnoyingPanel" runat="server"> <asp:Panel ID="P" runat="server"> </asp:Panel> </asp:Panel> </asp:Panel> How can I check if P is child of ParentPanel? Is there some LINQish way to do it? Is there some more optimized way than the one I p...

Why is my ASP.Net Date Format Changing Erratically?

I have an asp.net 4.0 Formview bound to a SqlDataSource, hosted on IIS7, and I'm displaying a date for editing like this: <input id="OrderDateTextBox" type="text" value='<%# Eval("OrderDate", "{0:d}") %>' /> This generally works as expected, but occasionally the date format displays d/m/y instead of m/d/y. When this happens, a page r...

Using LINQ, how do I find an object with a given property value from a List?

I have a class called Questions. This Questions has properties QuestionID and QuestionAnswer. While iterating through this List of Question in foreach, I have to find .QuestionID = 12. If I find .QuestionID = 12 then I have to immediately assign a value to .QuestionAnswer = "SomeText" of .QuestionID = 14. I don't want iterate again in...

_events is null or not an object error only when compilation debug="false"

Hello, I have been creating and using a page on the development environment for awhile, it is a search oriented page that is heavy on the ASP.NET AJAX controls. I've recently tried to move this to production, however, whenever I set the value in the Web.Config file: <compilation debug="false"> Clicking on anything on the page which ...

WIth this Code I am getting IE page load error on the Left hand bottom of the screen..

Hello Friens, I have this code in my view.. <div> <input type="button" value="Cancel" id="btnCancel" onclick="window.location.href='../Reviewer'" />&nbsp;<input type="submit" value="Save" id="btnSave" onclick="saveCreateHeader()"/><input type="button" style="margin-left:50px;" id="btnNextStep" value="Next Step" onclick="window.locat...

ASP.NET OnClientClick="return false;" doesn't work

Hi ! I just want to add some client side (JQuery Javascript) validation in a web user control. I put an OnClientClick handler and the function gets called. BUT, even if I return "false", the OnClick method always get fired. What am I doing wrong ? I'm with VS 2010, targeting the 4.0 framework with JQuery 1.4.2. and JQuery UI 1.8.4. He...

ASP.NET 2.0 Profiles - How do I prevent records from being created for users who don't accept cookies?

I am using ASP.NET profiles with allowAnonymous="true". I am NOT using ASP.NET membership. I recently took a hard look at the aspnetdb database and noticed that although my site gets 600-800 unique visitors daily, there are 4000-5000 "users" being created in the database. Clearly what is happening here is the users with cookies disabled...

Using devexpress HtmlEditor control has DXR.axd throwing 404

I am using a dev express control: ASPxHtmlEditor version 10.1. I am trying to create a simple that only has this control. Unfortunately the control does not render with any of its styles or images loaded. This happens over 20 times. The control does not have any of its styles and all of its images do not load on the control. I am ge...

Sort List Of Class using Id property?

I have a class called Questions. This Questions has properties QuestionID and QuestionAnswer. My list of Questions has QuestionID like 2,3,4,15,12,24,22,,,, etc I need to sort this List of Questions Object based on QuestionID and store in another Questions object. ...

What is the recommend way to create a custom culture and associated resource files for a specific Client?

I have client that wants to specifiy their own version of localized content for a subset of my string resources. For simplicity here is basic example: Lets say I have 2 localized strings (showing english content) PageTitle="Hello World" PageDescription="This is a more wordy version of Hello World!" I wish to localize these so I have re...

ui controls for asp.net

i have been using the basic toolkit that is provided with VS 2008 I am currently looking for UI control toolkit from third party. I am basically concentrating on Gridview, treeview, textboxes, hoover, buttons and graphs(piecharts) Order of preference: 1.) Totally free( can be used commercially no royalties) 2.) semi free ( can be us...

multiple model dialog in VB

I have a aspx page. Users can perform an action on that page. but that actions goes through series of other actions. for example- suppose there is JOin Community link on that page. When user clicks He is asked to Login/Register(A) THEN He is asked to fill up a brief profile(B) THEN he is asked to join community as member/admin etc (C). S...

Neither HttpHandler nor HttpApplication is getting called for /

I have an IHttpHandler registered like this: <httpHandlers> <add verb="*" path="*" type="MindTouch.Dream.Http.HttpHandler, mindtouch.core"/> </httpHandlers> Which catches /foo, /foo/bar, etc. just fine, but on / the Visual Studio built-in server does not hit hit either the HttpApplication or my handler. ...