webforms

Model Binder in ASP.NET webforms

For number of years I did ASP.NET web forms development I was spoiled by a proprietary library, which allowed me to do things like: UpdateToObject(ControlsCollection, obj) UpdateFromObject(ControlsCollection, obj) Conceptually code did something very similar to what MVC Model Binder does, i.e. given form's posted values as inp...

Runtime resolution of asp.net webforms routes

I am trying to create dynamic routes using .net 4.0 WebForms. Imagine I need mappings like these: mySite/Canada -> country.aspx mySite/Canada/Ontario/ -> locality.aspx mySite/Canada/Ontario/Toronto -> town.aspx mySite/Canada/population -> country.aspx mySite/Canada/history -> country.aspx mySite/Canada/Ontario/weather -> locality.aspx ...

ComboBox "New Option" Option w/ Popup Input to add option

I'm learning so be nice. I'm developing a web app for a product management system. My office purchase wholesale from multiple vendors and direct. My web app needs to accommodated basic "new vendor" creation within a product insert/update form. Is there a simple way to have an option in my combo box "New Vendor" that opens an input bo...

ASP.NET Forms Authentication prevents loading javascript on Login.aspx

Hi, All ;) I am experiencing problems with Forms Authentication. When I try to load my Login.aspx page neither javascript nor stylesheets do not load. Here is part of my web.config file <authentication mode="Forms"> <forms loginUrl="Login.aspx" timeout="30" name=".ASPXAUTH" p...

Best FOSS date picker (maybe time too)?

I don't have time to reinvent the wheel; can anyone recommend a free for commercial use PHP date picker (maybe with an option to pick time too, I'm not sure about that yet). I'd like to show something fairly unobtrusive, maybe a little calendar or clock icon, let the user choose a date (/time) and then display the selection. Hmm, can I...

ASP.NET Listbox not changing index

Hi, My question is probably a simple one to people used to ASP.NET, So here it is: I have a webform in a master page that has a listbox which populates itself with numbers which serve as unique id for my objects. The only problem is that the selected index property of the listbox is always -1 and it automatically deselects itself, no ma...

Tab space in ASP.NET listbox

Hi, Anyone know how to insert tab characters in an ASP.NET listbox? I want to use it so that all my items are lined up because i have two fields on each line a number and a name. In winforms all I have to do is: Listbox.Items.Add(number + "\t" + name); But in ASP.NET Webforms this doesnt work any ideas? ...

Maintain generic list between postbacks

Here is what is in my code-behind: List<Event> events = new List<Event>(); protected void Page_Load(object sender, EventArgs e) { } protected void AddEvent_Click(object sender, EventArgs e) { Event ev = new Event(); ev.Name = txtName.Text; events.Add(ev); } I want to add an item to the list every time the Add button i...

Is it possible to use HTML in web form that uses UIDatePickerView when viewed on iOS?

I want to present an HTML-based form in a UIWebView with a date field. I want the OS to recognize this as a date and show the UIDatePickerView for entering the date similar to the way it presents a UIPickerView when entering data in a form select field. Is this possible? ...

C# - Logging into this website?

How can I make my C# app log in to a website that requires username/password authentication? The page uses Apache Struts, if it matters. ...

Any good source code to learn MVP from?

Hi guys, i know MVC is the future but for some of us still stuck in the good old webform land, i'm trying to learn how to do TDD and introduce better testing for our current application... basically the asp.net 2.0 c# web app is quite complicated with some logic in sproc, some in the javascript via json data processing, some in user co...

Form from Model with File Upload

I'm trying to mimic the admin interface for the Photologue app on the front end. To achieve this, I have thus far created a bit of code in the view: def galleryuploader(request): GalleryFormSet = modelformset_factory(GalleryUpload) if request.method == 'POST': formset = GalleryFormSet(request.POST, request.FILES) ...

LINQ to SQL ASP.net

How ASP.net webform can be developed by retrieving data from two or more then two tables while using LINQ to SQL. can any body give some code sample for that ----- Thanks! ...

Should I use a repeater?

I have a table similar to: ID...NAME.....HTMLTEXT 1....Footer....`<b>test</b>` where each entry has some HTML text and an associated Name and ID. What I want to do in ASP.net C# is to list each of these entries on a page in such a way that the HTML text should be displayed exactly how it is meant to be (e.g. <b>test</b> should show '...

ASP.Net webforms application with pluginable architecture problem

Hello, It was told me to make a pluginable web app. with webforms. The idea is to have one base web application with a plugin host that will load any plugins and related to them web pages. As an example, I have my MyHostApplication with master page and a default.aspx file. When it is compiled, basically the project will have the files ...

SessionState expired behaviour

Is it possible to control the behaviour of ASP.NET when the Session has expired? It seems that the default behaviour is sending the user to the website root. The desired effect would be to send the user to a custom "Session Expired" page. To clarify, it's the SessionState that's expiring (set the timeout to 1 minute to quickly test it):...

How to allow html control inside a listitem?

The following compile error occurs: Parser Error Message: The 'Text' property of 'asp:ListItem' does not allow child objects. Source Error: Line 468: </asp:ListItem> Line 469: <asp:ListItem Value="3"> Line 470: Search only continuing stories with at least&nbsp; <input runat="server" id="episodetb" Value="0" style="width:50px" /> Line ...

After throwing a Security Exception, redirect to Login page...

I'm using WebForms and Asp.Net Routing. When trying to implement security on a members folder, I'm following the directions here : http://blogs.msdn.com/b/mikeormond/archive/2008/06/21/asp-net-routing-and-authorization.aspx private IHttpHandler GeneratePage(string VN, RequestContext RC) { string virtualPath = string.Form...

Does an ASP.NET website use cookies by default?

It seems like there are a lot of ways but no default. For State management, does ASP.NET use cookies by default? If so, what are the alternatives to using cookies? If not, what does ASP.NET use by default to manage state? ...

Joomla extension - Custom form with upload function

Does anyone know of a Joomla Form extension with standard Input text fields, textarea fields and Upload field? I need standard form extension that supports file uploading. Your reply will be very much appreciated. ...