webforms

ASP.NET Ajax - simple clientside communication example?

I need to use javascript to request some data from the server in a.NET 3.5 Webforms demo app. It comes to mind that I have only ever done this with AJAX.NET, jquery, and updatepanels. I don't want to involve external technologies, nor do I want to do even a partial postback. Can anyone point me at an example of the simplest way to do t...

'The report you requested requires further information' error using SqlDataSource with Crystal Reports

I have followed the Microsoft tutorial here to create a Crystal Report (with v12.0) within Visual Studio and attach it to a web form using a CrystalReportViewer, CrystalReportSource and SqlDataSource as I wish it to read data from my SQL Server instance. The report will load fine once (this appears to be snapshot data though saved embed...

Is it possible to create a form using only JS?

Hi All, I am trying to create a form using only JavaScript. I mean create a form for a web page, add elements to it, set their values and submit the form. Moreover, if JS is disabled in the browser the normal HTML form should get submitted. Is there any way to achieve this? Thank You All. ...

Setting properties on a user control inside a foreach loop

I have a user control that I use on multiple pages to show information about an object. Whenever I need to use this usercontrol, I call a method called Display (on the usercontrol) and pass in some values. public void Display(string name, List<Items> items) { // Set a few protected properties so I can display values from the aspx pa...

iPhone > Submitting a web form, handle cookies..

Hey all, I'm not at all sure where to get started with the following. Bascially the scenario Is, from my iPhone app I want to be able to login to a web form (via username/password combo) and perform another action. I want the process to be able to handle session persistence via cookies. My first thoughts were to look at going down the ...

asp.net CustomValidator never fires OnServerValidate

I have the following ASP page: <asp:Content ID="Content2" ContentPlaceHolderID="ShellContent" runat="server"> <form runat="server" id="AddNewNoteForm" method="post""> <fieldset id="NoteContainer"> <legend>Add New Note</legend> <asp:ValidationSummary ID="ValidationSummary1" runat="server" /> ...

How to use a standard webform aspx file inside an MVC project?

I have to write this script to send a mass email reminder but our head dev is out of town so I can't do a patch to the .dll, instead I am using an .aspx page that I can just push out. Problem is I cannot seem to get it to run, I put it into an open directory that allows browse-to-able-ness (avoiding the map routing) but I keep getting th...

Contact-Me from webpage without using email client

Hi all - help out a noob with a simple web development question?? I want to create a Contact-Me form on my website, but I'd like it to not go through the email client that's installed on the user's machine, in case they're at a public terminal. I don't mind if the email comes from "me" to "me", as long as nobody can use it to spam me! ...

PHP quiz send data to next page

ok, i'm trying to do a quiz...all good by now. but when i'm trying to send the collected data(radio buttons values) through pages i can't get the logic flow. I have the main idea but i can;t put it into practice. i want to collect all radio values create an array containing this values serialize the array put the serialized array into ...

PHP - Is this a good method to prevent re-submission?

This is related to preventing webform resubmission, however this time the context is a web-based RPG. After the player defeats a monster, it would drop an item. So I would want to prevent the user from hitting the back button, or keep refreshing, to 'dupe' the item-drop. As item drop is frequent, using a DB to store a unique 'drop-trans...

Flexible Web forms for data collection systems

Does anyone know of a generic framework that can be used to dynamically generate input web forms for data collection? For example, an online loan application form my require more information in 2010 than currently in 2009. Is there a way to just add a new field to the database and have it dynamically be added to a web form? I'm using MSS...

need a jquery time entry widget for an HTML form

Hi - I'm looking for a nice HTML form widget that makes it easy to enter a start time and an end time. Any recommendations? Thanks, Graham ...

How to use SwingX-WS to simulate an HTML Form submit? (Not a directly post request)

i would like to know how to use the library in https://swingx-ws.dev.java.net/ to scrape a web page and submit a form. the simple code writen below is simply not working and i don't know why. could someone help me? thanks in advance. public static void main(String[] args) { try { Session s = new Session(); Resp...

Is the single <form runat="server">-element requirement really necessary for ASP.NET WebForms?

Looking at some of the changes coming to WebForms in ASP.NET 4.0 I can see many improvements that give developers even more control over the output. Some of these improvement have been a long time coming, and for some time it seemed that it wasn't even possible. It made me wonder if the current model with the single form element that run...

I want to detect when user close browser window ?

I have Example and i need to kill the session when user close his browser window. i tried page_unload() not working. the example is:i have parent windows and window will open from it i need to delete session when user close the child window. please i need some help. ...

Can WebForms and MVC live in a single project?

I'd rather be doing MVC as the regular WebForms development eats my soul. However, I've been given a fairly sizable WebForms project to add a bunch of features to. Is there anyway for WebForms and ASP.NET MVC to coexist in single project or even jointly handle the website? I know I am asking for a hack. ...

Really simple GridView ASP.NET question

Ok, this should be really easy, but I just don't have enough experience. I need to throw a GridView on a WebForm and populate with a List, where Template is my class that has ID, Name, CreatedOn, etc... properties. The GridView needs to display each Template Name as a link. The link should point to TemplateEdit.aspx page, with the fol...

Partial SSL in ASP.NET Webforms without changing IIS configuration

We have a very simple ASP.NET web application comprising mostly static content and a single form which we want to protect with SSL. The secured page is in its own folder, but it inherits from an unsecured master page, and it shares some other resources (the logo, css file and some pictures) with the rest of the website. The site is hoste...

What's the best way to write a maintainable web scraping app?

I wrote a perl script a while ago which logged into my online banking and emailed me my balance and a mini-statement every day. I found it very useful for keeping track of my finances. The only problem is that I wrote it just using perl and curl and it was quite complicated and hard to maintain. After a few instances of my bank changi...

Creating an AntiForgeryToken through Dependency Injection

I'm working on improving the security of my company's website and wanted to create a token to prevent forgery attempts that could be easily maintained this is what I came up with. public class AntiForgeryToken { private readonly string _referenceToken; public AntiForgeryToken() { _referenceToken = Guid.NewGuid().ToS...