webforms

Nested DataPagers problem

Sample code <asp:Repeater> <ItemTemplate> <asp:ListView DataSource=<%# Container.DataItem.Items %> ... /> <asp:DataPager .... /> </ItemTemplate> </asp:Repeater> This does not work. The repeater data source is not a datasource control It is set like so repeater.DataSource = datasource repeater.DataBind() ...

Working with DataBinding and Page_Load in ASP.NET MVP

I'm using WebForms MVP to create some simple reporting applications. Most of these applications consist of a few search criteria inputs and a ComponentArt datagrid that I'm populating with data from the database. Most of the markup is in a UserControl, which is in a content page with a master page. My problem is that the control's Pag...

overwrite parameters passed by querystring

I have the following problem I have a web framework built with classic asp that saves the page state in hidden textboxes, and then issues a submit to itself. Before submitting, we have a javascript functions that saves the action in a hidden "action" input, and then performs the submit. The page loads the state from those hidden texts...

How to clear all form fields from code-behind?

HTML has an input button type to reset all fields in a form to their initial state in one step: <input type="reset" ... />. Is there a similar simple way to reset all form fields of an aspx page from code-behind? Or is it necessary to reset all controls one by one with TextBox1.Text=string.Empty, TextBox2.Text=string.Empty, etc. ? Tha...

ASP.NET control event handler not firing on postback?

I have a control which has an ImageButton which is tied to an OnClick event... Upon clicking this control, a postback is performed and the event handler is not called. AutoEventWireup is set to true, and I've double checked spelling etc.... We haven't touched this control in over a year and it has been working fine until a couple of w...

VB.NET ASP.NET Web Application woes (VS 2008)

Hi all, I am making my first web application with ASP.NET and I am having a rough time. I have previously created the application I am working on as a Windows Form application and it works great, but I am having problems with the HTML side of things in the web application. My issues are pretty minor, but very annoying. I have worked w...

How to detect hidden field tampering?

On a form of my web app, I've got a hidden field that I need to protect from tampering for security reasons. I'm trying to come up with a solution whereby I can detect if the value of the hidden field has been changed, and react appropriately (i.e. with a generic "Something went wrong, please try again" error message). The solution sho...

Asp net aspx page and webcontrol issue

Hello, I have a class that inherits from Page, called APage. public abstract class APage: Page { protected Repeater ExampleRepeater; .... protected override void OnLoad(EventArgs e) { if (null != ExampleRepeater) { ExampleRepeater.DataSource = GetData(); ExampleRepeater.DataBind(...

Efficient gridview in asp.net webforms

Hy guys. As you know the gridview control is super heavy and reduces performance of the page, as the viewstate length is higher. I'm trying to get a alternative way to not use default asp.net gridview webforms. In asp.net mvc we can pass a model for example with Examples[] and in the view iterate over this array and build a grid and ...

WebForms Text Input => Doubles & Strings & Booleans

Is there a better way to do "input forms" in WebForms? I always end up with code like this: Double d = 0; // chuckle inside if(Double.TryParse(myNumberTextField.Text, out d)) { myObject.DoubleVal = d; } Is there a better way to process free-form "numeric" input. ...

Multipage forms for joomla (looking outside the box)

I have created a number of forms using various Joomla components which have more or less worked successfully. Recently I have attempted to create mult-page forms - the forms work...but they are slow as molasses. Having spent a couple of weeks trying to resolve this and not seeing any signs of improvement ...... I wonder if anyone has e...

Dynamically adding a CSS file from an ASP.NET Server Control

I have a custom control and I want to dynamically insert a link to a stylesheet. Might not be the best solution of the year but it needs to be done. Any idea how to do it? Everytime I try, Page.Header is null. ...

How do you persist a class on PostBack in an ASP.NET 3.5 Web Forms project?

How do I persist an ASP.Net class on PostBack? I've already taken the time to go to the database and fill my object with values when the page loads initially, so how can I save this object in an elegant way on a PostBack? The page that contains the custom object posts back to itself. For what it's worth I'm using C# in an ASP.NET 3.5 ...

Custom 500 Error Page with ASP.NET 3.5 SP1 WebForms (not MVC) and Routing

Could someone share the technique to get a custom 500 error page displaying in ASP.NET 3.5 WebForms with System.Web.Routing hooked in. I was able to get a 400 Error Page working by creating a catch-all route but don't understand the technique for showing a custom 500 error page. I would like if the URL remained for the page that blew...

html/javascript automaticly getting link from submit button (maybe automating with python?)

I have a website where I have to click a submit button on a form. This gives me a link. I know the link is made up with the paramter that is passed through a hidden value. I was wondering if I could make a python script or something else that would go to the website and click some buttons returning the link that the submit button generat...

Web Forms 2.0: Editor & Libraries

Hi! I would like to build a web application where users can create forms with very few technical knowledge. Since they need "advanced" features like validations, required fields and some more, I am currently evaluating XForms and web forms 2.0 (from HTML 5 spec). Concerning web forms, my research couldn't find any answers for the follow...

How do you set up a URLRewrite for a form?

if I have a form <form action=script.php> with a parameter like <input name=keyword> so my URL would be like www.domain.com/script.php?keyword=keyword1 how do I use URLRewrite in this case to change it to www.domain.com/script/keyword1/ had this been a regular link i can easily do it.. but what got me was how to do this out of a form ...

ASP.NET Login Control rejects users who exist

Hi, I'm having some trouble with the ASP.NET 2.0 Login Control. I've setup a database with the aspI.net regsql tool. I've checked the application name. It is set to "/". The application can access the SQL Server. In fact, when I go to retrieve the password, it will even send me the password. Despite this, the login control contin...

Why doesn't a URL with two hyphens ( in one segment ) match a Route in my Route Table?

I'm trying to resolve this URL Route: Route articlesByCategory = new Route("articles/c{cid}-{category}", new Handler); However, it seems like the following url won't resolve to this route: // doesn't work www.site.com/articles/c24-this-is-the-category-title // This works www.site.com/articles/c24-category I assume it has to do wit...

Can I have two separate projects, 1 WebForms and 1 ASP.NET MVC, to both point to the same domain?

Is it possible to setup two separate projects, 1 WebForms and 1 ASP.NET MVC, to both point to the same domain? i.e. both point to different pages within www.somesite.com. Here's some background on the application and why I'm asking. This is a brownfield application that is currently 2.0 WebForms and is full of WebFormy 'goodness' (i.e....