webforms

How do I change the security paradigm for the MembershipProvider?

I'm wrestling with building a custom membership provider that allows me to have the security scheme I need. I have my own IPrincipal, IIdentity, and MembershipProvider. I have the authentication working fine. The problem I'm running into now is the authorization. The problem I have with the authorization scheme is inherintly in the I...

How can I use the dropdownlist to populate/enter data?

Here's my existing code: <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="dsEmployees" DataTextField="Last_First" DataValueField="EmpNum" onselectedindexchanged="DropDownList1_SelectedIndexChanged"> </asp:DropDownList> ...

Can a web control edit properties belonging to its parent?

I have a .aspx page that loads three separate .ascx controls to represent adding, editing and listing objects. It currently simply swaps out visibility and enables/disables the controls to switch between pages. However, when listing objects (in a gridview), we offer the basic "Edit" button beside each one. Clicking on this will, obvio...

Using a CheckBox to Select Rows in an ASP.NET GridView

With a GridView control in .NET is there any way to change the Select option in a GridView to a Checkbox, how do you select multiple rows? I tried adding a CheckBoxField into my GridView but when I ran it it didn't show up. ...

asp:LinkButton with Javascript errors in an user control

Hi all, I have a asp.net page with some user controls in it. One of the controls is a search form that has its results populated into a gridview. The gridview needs to have some extra columns that contain 3 LinkButtons that perform a url calculation and redirect to another page. The reason that I chose LinkButton over HyperLink is tha...

Is it possible to suppress the Web Forms Designer in Visual Studio from being opened?

The primary reason for asking how to do this is because I personally never use it. The Designer is slow to load... especially on complex pages with lots of controls. To put it bluntly, I think of it as a crutch that web developers should avoid. I would like to encourage team members to avoid using it as well. If there is a way to do ...

Are users who include "Captcha: blah blah blah" in site comments devaluing captchas as a whole?

In the blog comments for SO and other blogs, I've noticed a trend in some users posting what the captcha was that they had to solve to get their post accepted. Are they doing this in order to aid captcha-breaking bots? If so, is there a way to programmatically (server-side) compare the users' input to the captcha to strip it out of t...

When to use ASP.NET MVC vs. ASP.NET Web Forms?

One of the common questions asked regarding ASP.NET MVC is why should you use it over ASP.NET Web Forms? The answer generally includes ViewState and clean URLs, amongst others. Towards the end you'll find a blurb about using the right tool for the job and that they serve different purposes. However, I don't believe I've ever seen what...

ASP.Net PostbackURL doesn't work if I put in Javascript Validation

I have a usercontrol in ASP.Net featuring a button that I use to postback. This button also has some Javascript validation that is done before it processes the event. Today I tried to postback to another URL by setting the PostBackURL property of the button. But it didn't work and the page kept posting back to itself. So I did some inve...

ASP.Net Webforms: Can a RequiredFieldValidator be listened to? (Event)

Basically is there a way to hook into when a RequiredFieldValidator does what it does? Like validator.ValidationCompleted ? Normally for script controls, you can create an expose events so that you can listen to them from other controls, and I was asked if this is possible for the build in validation controls in asp.net but couldn't co...

How to force ASMX web service to send JSON data to client on HTTP GET request?

I'm trying to use the official jQuery autocomplete plugin with an ASMX web service in an ASP.NET 3.5 Web Forms application. If I understand it correctly, the autocomplete plugin can only use HTTP GET to call a service (with two query string parameters: q and limit). I figured out how to make the web service respond to the HTTP GET calls,...

Choose button while pressing enter button

I have a submit button and back button in my asp.net webform. I need to use the submit button when pressing enter, but it's going to the back button instead. Please help... ...

Using jQuery's getJSON method with an ASP.NET Web Form

Hi, How do I go about calling a method on an ASP.NET Web Form page using the getJSON method on jQuery? The goal is this: User clicks on a list item The value is sent to the server Server responds with related list of stuff, formatted using JSON Populate secondary box I don't want to use an UpdatePanel, I've done this hundreds on ti...

ClientID invalid after moving code into DotNetNuke module

I am porting an existing application to a DotNetNuke module and discovered bizarre behavior. I use ClientID when creating javascript so that the code can identify the HTML elements. Normally that creates a value something like this: "g_ctl00_ctl01_ctl00_ctl00_txtSearch" We've all seen this a million times, right? Well, after porting t...

FindControl() returning copy?

I'm trying to use FindControl() to SET the values of some DropDownLists on a page. for some reason, it appears that FindControl() is returning a copy of the control object as opposed to a reference, I was under the impression that this would not be the case due to the lack of a copy constructor for Controls? <EDIT> Ok, it apparears t...

codeigniter sticky forms

I just started using CI today.. I normally use CakePHP but a whole lot of smaller projects needed something less "bulky". What is the easiest way to implement sticky forms (retain user input after reload) in CI? I currently have a whole lot of radio buttons for multiple choice quiz and some other text fields and when validation fails...

ASP.NET webforms: set cookie using jQuery on the OnSelectedIndexChanged event

Consider the scenario where: an ASP.NET webform page has a DropDownList and a ListView. this DropDownList must set a cookie value on its OnSelectedIndexChanged event. the DropDownList is also set to AutoPostBack="True" to force the ListView to reload using the DropDownList's new value. the page is referencing current JQuery libraries, ...

codeigniter associative array in post

I normally name my db specific fields in my forms like this "objectname[columnname]", I tseems CI cant access these values using $this->input->post('objectname[columnname]'), what do I do? there is not a chance in hell im renaming 100+ form fields.. I am actually disliking CI, it really is getting in the way of progress by changing the d...

ASP.NET Forms: Using jquery to post to asp.net page method with parameters

I've seen lots of related questions, but nowhere have I found a simple example of code that passes parameters back to a page method via jquery. I've looked through some of the examples at encosia.com (thanks, Dave) but still haven't managed to get it working. Here's the code so far: Updated - added some code to pass in params, but it'...

Asp.Net nested form

I need to supply an html form (not a server form) for searching within an asp.net web-forms website. The form will post to another website where an indexed search is performed. Seeing as nested forms don't work well in asp.net, what is the simplest approach for this? The nested form is a simple html form that performs a "get" against ...