asp.net-webforms

Turn off input validation for a single field

I've got an ASP.NET 4 site on which I want to allow people to put '<' in their password. However, .NET gets in the way by blocking (what it sees as) an attempt to put HTML in a form field. I know I can turn off input validation entirely, but I only want to turn it off for this one field. Does anyone know an easy way to do that? ...

Object data source select method returning nothing in code call

I have an ObjectDataSource with the proper SelectMethod and SelectParameters configured. The data source is bound to a grid view which successfully displays the data on page load. What I need is the ability to rerun the Select method defined by the ObjectDataSource to be stored in a variable and manipulate the items in it. The issue I k...

change the url of redirection of a dropdown with auto postback

Hi!! I have an .aspx page named PropertyListNew.aspx which it's url is rewriten like this: <if url="/Propiedades/(.+)/([0-9]+)"> <rewrite to="/propertyListNew.aspx?currentPage=$2" /> </if> the thing is: I have an asp:DropDownList inside my page (with current url "/Propiedades/(.+)") with autopostbak=true and when that dropdown...

Have you ever seen someone try to implement the MVP pattern with ASP.NET Web Forms?

Have you ever seen someone try to implement the MVP pattern with ASP.NET Web Forms? And if so, how did they do it? I'm working with a code base that is more than 10 years old. Before I arrived, somebody tried to implement the MVP pattern with ASP.NET Web Forms. I'm just wondering if this is unique to my code base or if other...

Issues with aspnetForm in hybrid asp.net webforms/mvc app

I am building a hybrid MVC/Webforms application where my MVC views are using an asp.net webforms 2 MasterPage. Everything has been working perfectly until I decided to put a form in my MVC view. Since ASP.NET Webforms wraps the entire page in a form element and you can't have a form within a form, I'm a little bit stuck. There are a lo...

how to change html image src by by c#.

<img src ="~/UserControls/Vote/Images/Arrow Up.png" id = "vote-up-off" runat = "server" alt ="vote up" class="voteupImage" style="height: 45px; width: 44px"/> here i want to change src of image for certain condition like if ( a==4) { src url shuld be ...... } else { src url should be... } ...

list of all available server controls

Just as the title states, can anyone point me to a list of all available asp.net server controls (preferably with descriptions)? I would have thought that something like this would be readily available but I've had no luck finding this. I almost always have to dig around to find a control to solve a particular problem, a quick referenc...

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...

Display a Workflow using simple Html and JavaScript

I have been tasked with displaying a Workflow. We have our own custom Workflow engine (don't ask) which defines the different workflows, steps and transitions. I have to display the current state of a workflow and then allow the user to select a failed step and retry it if he/she chooses. I'm looking for something that is as simple as...

ASP.NET WebForms Binding in Markup versus Overriding OnItemDataBound

There are two primary methods of getting data onto a page when it comes to associating that data to markup using some kind of Repeater; performing data binding in the markup (DataBinder.Eval, etc.) and overriding the OnItemDataBound event, finding the control on the page, and setting the value on the control in the code behind. I have my...

How to organize my code (methods I create for various uses on my website)

I wrote some code to connect the application to it's database, then I created some code to use the connection code and retrieve, update or add some values to the database, Also I might have some code to deal with other stuff than to deal with the database The code is a little complicated, maybe it's simple but it's not short, for exampl...

How to Display EntityDataSource Associations on an ASP.NET FormView Control?

Hi All, I have a simple Web Form where I've dragged a FormView and dragged an EntityDataSource onto my page. The page shows a single contact with all tags associated with it. I can't seem to get the related tags of a contact to display in a gridview. For a picture of what I'm talking about click -> here Please state exact steps becaus...

Sharing Data Between Two Web Applications in ASP.NET

I have a web application (MainApplication) where many of the pages contain a custom Web Control that looks for some content in a cache. If it can't find any data within the cache, then it goes out to a database for the content. After retrieving the content, the Control displays the content on the page. There is a web application (CMS) i...

What does this do: MS_POSITIONING="GridLayout"

The string appears on all <body> tags in some old asp.net webform applications. ...

no reaction when drilldown

I want to drill-down my MSchart with ASP.NET 4.0. The main chart chtType was displayed successfully. I need to display the other chart Chart1. Public mSeries1, mSeries2 As Series Public mChartArea As ChartArea Public ocmd As SqlCommand Dim cnn As SqlConnection = New SqlConnection( "foo") chtType.Series(0).PostBackValue = "#AXISLABEL...

ASP.NET: Suddenly the name 'form1' does not exist in the current context?

This has been working for the past three weeks that I've been developing this application, and for some reason has decided to stop working five minutes ago despite my apparently not doing anything. In Default.aspx: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="AppName.Default" %> <!DOCTYPE html P...

ASP.NET two-way binding in user controls

I have a pretty simple control for user to choose a TimeSpan, which consists of a textbox and a drop-down list with time units (minutes, hours, days). I parse the value in LoadPostData method, but when the parent FormView is enclosed in, say, MultiView the TextBox's Text property is empty. When should I parse the value to make it work in...

jQuery remove() issue with IE

I'm having an issue with jQuery's remove() method in IE. It's removing the element, but not entirely: it's leaving the last 2 closing tags. I'm using ASP.Net Web Forms. In the page, we're using a 3rd party widget, which is a Javascript include. Part of the 3rd party widget is a search box and button inside of a form. (Everything in the ...

ASP.NET Localization Not Working for me

I know I'm doing something fundamentally wrong, but I can't quite figure it out... I have 2 resource files in my App_GlobalResources folder: Global.resx and Global.fr-CA.resx. I have the following label on my webform: <asp:Label ID="Label1" runat="server" Text="<%$ Resources:Global, Test %>" /> When I run the form, it displays the v...

Handling the submit action of two TextBoxes

I have an ASP.net page. That has an Ajax Toolkit Tab Control. That has tabs. That have custom ascx controls I wrote. I have a text box that perform a search action. It is declared like this: <asp:TextBox ID="txtPrereqSearch" runat="server" ontextchanged="txtPrereqSearch_TextChanged"></asp:TextBox> Nothin...