webforms

Referring to ASP.NET controls from Business Logic

In my page I have a textbox txtMyInfo. I also have a separate business logic class that I use to manipluate stuff on the page. How do I refer to txtMyInfo from a method in the business logic class. Can I reference the control via the page object? I don't see a reference. public void MyBusinessLogic(Page page){ page.Controls.txtM...

Is there a microsoft based asp.net split container?

MSDN has the functionality I'm looking for here. Since microsoft recognizes the usefulness of a split container for the web, is this page using a publically available microsoft created, .net based split container? ...

Is ASP.NET MVC really only for 5% of Programmers?

I've seen this phrase (ASP.NET MVC is for 5% of programmers) thrown around and have wondered if it is actually true? Since the release of ASP.NET MVC, I have seen more and more questions and tutorials created for MVC while those for WebForms seem to slowly disappear. Looking over stackoverflow questions, majority are about ASP.NET MVC....

How can I stop the password field being pre-populated on edit?

I have this problem all the time in my rails apps and I still need the correct solution. Whenever a user edits their own record the password field is being populated. I suspect its Firefox as setting @user.password = nil in the edit action doesn't help. The problem is the password confirmation isn't populated so validation fails due to ...

In ASP.Net site, how do I get name of the user that the person is signed in as?

I'm trying to put together a (real-life) game for my college campus and it'd be really easy if they just go to a website and click a button that says "Sign Me Up!" in which that button would send the username that person is signed in as (Since user names on our school laptops are always firstname.lastname). If there's no way I can grab t...

Looping through dynamically build form

Hi, I have created a questionnaire in C# and when the user has entered their responses I want to capture the answers and save to the database. I am building the content in codebehind and putting it into a placeholder on the page. I can get a handle on the placeholder PlaceHolder a = (PlaceHolder)FindControl("PlaceHolder1"); But whe...

main purpose of using mvc

Hi all Ive been doing a bit of research / reading into mvc recently and was just wondering what the main purpose is. is it as some people say to seperate the logic from the html or to create clean url's i could be missing the point completely, but asp.net forms really seperates the logic from the html and if you just want clean ur...

How to Use NHibernate Validator with ASP WebForms for client-side validation?

I'm currently adding features to an ASP.NET WebForms application that relies on NHibernate Burrow, and would like to replace the standard ASP.NET form validation controls with something that integrates with model-level validation. NHibernate Validator was easy to implement on the models, but I am unsure on how to get matching client-si...

What is a good jQuery plugin (or plain JavaScript library) for skinning HTML Web forms?

I'm looking for a high-quality plugin or library for creating custom cross-browser-compatible skins for HTML form controls. I want to eliminate the inconsistency of visual appearance of form controls in different browsers and operating systems. I've done some searching, and the most useful page that I stumbled upon is: http://www.quene...

How To ? Form Post to Multiple Locations

I have a form which I need to POST to multiple scripts. How can I do this the simplest way? I know it could be done with Javascript, Curl or Snoopy class, but really which is the most simplest and best way to do this. One of the scripts sends email and it's a php file, the other is hosted elsewhere. Need to collect data on both script...

Reset input values from GET url params using jQuery

This may seem like an odd one, but I want to be able to fill in a static web form using values passed in via a GET param list. Say I have a page, 'self.html': <form action="self.html" method="get" accept-charset="utf-8"> <label for = "40">New Question?</label> <input type="radio" name="40" id="40" value="Yes"> Yes &nbsp; <input ...

How to implement automatically select item in a html and click submit ?

I have a website, and username and password, and usually I will login the website with the username and password, and select some items in check boxes and submit them to execute actions. but right now i need to write a application to select the checkbox by some keywords and submit them automatically. Do anyone have good idea ? I used ...

Keeping the focus on an html form in spite of tab key

Hi, I am trying to create a webform in HTML, and if needed javascript. In this webform one should be able to enter source code, so to do that comfortably I would like one to be able to enter tabs. Is there a way to achieve this? Thanks ...

Formtastic and Formtaghelper

I'd like to create a user registration form where the user ticks some boxes that do not connect to the model. For example, there might be a 'terms & conditions' box that I don't want to have a boolean field in the User model saying 'ticked Terms & Conditions'. Instead I want to create a record somewhere else (like a transaction) that re...

How do I compile asp.net webforms partial classes into a dll file?

If I use this code vbc /t:library /r:System.dll,System.Data.dll,System.Web.dll,Cooperator.Framework.Web.dll, DateRangePicker.dll,DateRange.dll,conexiones.dll, abmbancos.aspx.vb I can compile the codebehind file of an asp.net webform page into a dll file, as long as the codebehind file is declared with a regular class instead of a parti...

IE not offering to save password of ASP.NET form

Sometimes Microsoft does something so stunningly dumb that it makes my head hurt. Help me find out it's really not the case ... please! I've got an issue with the login page of an ASP.NET (3.5) site I'm developing whereby IE (7 or 8 ... can't bear to open 6) doesn't offer to save the password when a user logs in. I've checked other brow...

FacebookConnect integration with ASP.NET

I'm working on a site with a Facebook Connect integration on blog posts. I want a Facebook .NET SDK that will allow me to: Authenticate that a user is logged into FB. The actual login will be done via the typical FBML login button and simple JS with the XD Receiver. Be able to push data from my WebForm to the user's FB profile, such as...

What are possible reasons for "Potentially dangerous Request.RawUrl"?

In an asp.net web forms application we get an error message with "A potentially dangerous Request.RawUrl" sometimes, but I cannot find the source of it. What are the possible reasons for this exception? Some details from our case: Event message: A validation error has occurred Exception type: System.Web.HttpRequestValidationExcept...

Create custom controls with inner html c#

how can i create a custom control that accepts a inner html, like the usual .net datagrid or ajax tabbed control... something like this: <KITT:tabs id="s" runat="server" > <w:tab sectionid="benefits"> here goes my html or any content, i want to render as is </w:tab> </KITT:tabs> I know how to create that with no inner html, a Tab ob...

Form APIs for ASP.NET

I want to know about the availability of Forms APIs for ASP.NET, either for MVC or WebForms. I am learning about Django right now, and I really love their forms APIs. Having a similar thing in .net will be very interesting as most of my time is wasted on UI issues. Microsoft Dynamic Data gives me similar features, but it's not mature en...