webforms

Is nested <form> possible ?

Hi, in a content page of an asp.net web page, i would like to include the "paypal" button "Pay Now". So, i've a master page, and a content page. In my content page i copy-paste paypal code. In particular i use a "modalpopupextender" to permit my user to buy the object. The problem is... it not work. So my hypotheses are: I'm not ...

Tag Cloud server control for ASP.NET

Is there a Tag Cloud server control for ASP.NET that can satisfy theese requirements: font size calculation formula from wikipedia (http://en.wikipedia.org/wiki/Tag_cloud) just href rendering, no javascript needed css classes for all font sizes used in cloud I know that I can build it myself ;) and quite easly but I am lazy and maybe...

Rails: editable/non-editable field depending on user permissions

I'd like to display a single form in which each user can edit different fields. Currently, the code looks like this: <% if can? :update, item %> ` <%= f.text_field :title %> <% else %> <%=h f.object.title %> <% end %> I can package this in a series of helpers (one for each field type) but I also have to check in the controller wh...

Why doesn't PHP send the email?

I am trying to send an email message with data collected from an html form. Here is the form: <form action="estimate.php" action="post"> <fieldset> <input type="text" name="name" value="FULL NAME" onfocus="if (this.value=='FULL NAME') this.value='';"/> <input type="text" name="phone" value="PHONE NUMBER" onfocus="if...

Accessing ActiveX method from asp.net (C#)

I have written an activex user control to get an image from a user's clipboard. I have a method to get the byte stream for this image. I want to embed this into a asp.net webforms page (C#). I am not sure how to call this method from the "code behind" portion of the asp.net page by using c#. I am not able to access the object from the "...

How to use PHP to generate HTML form to let user do complex searches on a database?

Let's imagine I have a database and I want to programatically allow the user to build queries. I am coding in PHP and will output an HTML form to let the user specify his query. I know the names of all fields, their types (int/string/date, etc) and maybe also min/max. How can I best present this visually to the user and let him select ...

Is there any reason I should NOT auto-trim html form parameters?

Hi, I just noticed to my surprise that whitespace at the start or end of form parameters is not automatically removed in ASP.NET MVC 2 (browser: Firefox). I always assumed this would be the case, simply because I could not see a scenario where I would NOT want trimming to happen by default. This can be fixed very easily by implement...

ASP.NET AJAX UpdateProgress in User Control for UpdatePanel in parent page

(solved, see below) Hi all I'm working on an ASP.NET web forms application. In my Page I have an UpdatePanel and a user control with an UpdateProgress and a bunch of buttons. When the user clicks one of the buttons, I'd like to perform an asynchronous postback and show the UpdateProgress. Can anyone help me with making the postback as...

ErrorMessage and ValidationSummary in asp.net (web forms)

Hi, i'm beginning with web forms in asp.net and i just want a simple example of how can i show a error message on my aspx page. The intention, is to make run as follows: The user fill 2 fields User submit the form The 2 fields are compared on the server If the two aren't equals, show the same page with the classical red text on the sid...

Can PHP manipulate (show/hide) div elements like jQuery?

I'm making a form and when a user hits submit, i want it to hide the form and show a section that says "thank you, blah blah" I'm using PHP/PEAR Mail Factory: $mailObj =& Mail::factory('mail'); $bool = $mailObj->send($recipient, $headers, $body); if($bool) echo "Thank you for your submission."; else echo "There was a problem ...

Best Practices for Passing Data Between Pages

The Problem In the stack that we re-use between projects, we are putting a little bit too much data in the session for passing data between pages. This was good in theory because it prevents tampering, replay attacks, and so on, but it creates as many problems as it solves. Session loss itself is an issue, although it's mostly handled ...

Blackberry on ASP.NET Webforms is losing SessionID

We're having trouble with an existing ASP.NET Webforms app. It's an app that has been running successfully for years; we're adding a Mobile section and Blackberry with Javascript enabled is giving us trouble. We have SessionState turned on, with the SessionID stored in a Cookie. The Blackberry device (tested with both 5.0 and 4.6) is ei...

TextBox: Display value in one format but return another format

i would like to display phone number fields on a website as (123) 456-7890 but have the system see it as 1234657890 when calling myTextBox.Text i am thinking this would require overriding the text property and cleaning it up in the overridden property but wanted to run this past the community. ...

How can I use PHP to mail my an attachment?

Hi all, I have a basic form consisting of input fields as well as a file field. I have a few things that I want the form to do. Collect the information (obviously). There's also an option to upload a file, (probably .doc,.pdf,.docx), so I want to restrict the attached file only to those extensions and under 2MB. All I know is that I hav...

ASP.NET MVP as a symbiosis of ASP.NET Webforms and ASP.NET MVC

I have developed web applications for a couple of years with ASP.NET Webforms and I still like it, above all because of the RAD possibilities, it provides. Since two years ASP.NET MVC is now available as a direct competitor to the classic ASP.NET. Somehow I don't want to throw away all my Webforms experiences and move to ASP.NET MVC. One...

ASP.NET two way databinding with nested objects

Howdy, Recently I returned to ASP.NET WebForms programming and I've come across a problem that I'm sure was not an issue previously. I have a Customer object with and Address object, I can bind up to all the properties of the customer (including the address for display) but when the formview binds back it throws an exception say that...

Callling business logic layer method from PageMethods

I've a static page method in web form application and I want to call method on private class level variable from it as shown below. I'm using jQuery to call the page method. private readonly ICatalogBLL _catalogBLL = new CatalogBLL(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { _catalogBLL.GetSomet...

to learn entity framework, how do i use it in a pet project?

hi all, i want to learn entity framework. i started with some EF tutorials and i also know little about linq to sql. i want to learn through a pet project. project should be in three layers. web forms (prez), data layer(c# lib), bussiness layer(c# lib). Project can be any, any functionality. just want to learn how to use EF in diff. la...

How can I use HTML5 email input type with server-side .NET

As I understand it, the <input type=email> element in HTML5 will render as a simple text field in browsers that do not support the tag. On other browsers it will render properly, like on the iPhone it will bring up the e-mail keyboard layout. I’d like to use this in a project but my input fields are <asp:TextBox> controls. How can I us...

How do you implement a culture-specific address form using ASP.NET MVC?

We currently have a WebForms control with an update panel. The code-behind contains logic to show/hide fields based on the selected country. This is fine for WebForms, but we ware moving to MVC, and I'm having a hard time sorting this out. I also need this to be localized, both in terms of localizable resource strings as well as displayi...