Developers Tutorials in ASP, PHP, ASP.NET, JSP, Python AND Ruby
 
Classic ASP ASP.NET PHP/mySQL JSP/Servlet Ajax Ruby Python Cold Fusion Perl
  Home |   Topics |   Search |   Login / Register |   Rss Feeds


Topics
» Classic ASP
» ASP.NET
» PHP/mySQL
» JSP/Servlet
» Ajax
» Ruby
» Python
» Cold Fusion
» Perl
Search news
Search for:

My Account
Email:

Password:


Register
Forgot password?

Listed in ASPin.com




site statistics



Cross-Page Posting Example



So many years ago, while studying with ASP 3.0, it was very diffucult to receive form pastings from another ASP page even it used to do with ASP:NET 1.x. But .NET 2.0 comes with some new feature line Cross-Page Posting. So what's cross-page posting: clients can post values from one page to another and another ASP.NET page can easily take response.

To understand this feature let's write a sample code:

Default.aspx

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Cross-Page Posting</title>

</head>

<body>

<form id="form1" runat="server">

<div>

<br />

&nbsp;<asp:Label ID="Label1" runat="server"></asp:Label><br />

&nbsp;

<asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>


</div>

<asp:Button ID="Button1" runat="server" Text="Post Back Page itself" />

<asp:Button ID="Button2" runat="server" Text="Post Back Page Another Page" PostBackUrl="~/Default2.aspx" />

</form>

</body>

</html>

Default2.aspx

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Untitled Page</title>

</head>

<body>

<form id="form1" runat="server">

<div>

<asp:Label ID="Label1" runat="server"></asp:Label></div>

</form>

</body>

</html>


Default2.aspx.vb - Code Behind File

Partial Class Default2

Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Dim pp_Calendar1 As Calendar

pp_Calendar1 = CType(PreviousPage.FindControl("Calendar1"), Calendar)

Label1.Text = pp_Calendar1.SelectedDate.ToString

End Sub

End Class


As you've seen that, .NET 2.0 can easily handle and trace form post. In early days of web development, it was very diffucult to trace form post.

Happy Coding




Title: Cross-Page Posting Example
Submit Date: Monday, March 26, 2007
Last viewed at: Thursday, August 07, 2008
Today Hit: 13
All Time Hit: 6856
Reviewed : 0 times
Voted : 0 times
Av. rating :
View tutorial

More latest headlines in ASP.NET
It displays various status information about the current upload, just like pure HTML progress bar but instead of popup window it uses an inline progress bar with the AJAX technology. KFileUploadPlusProgressBa r Control takes full advantage of AJAX and the new features of Microsoft's next- generation IDE - Visual Studio .NET 2005, hence allowing developers to enjoy significant productivity gains, while delivering feature-rich, standards-compliant and cross- browser compatible web applications. developers to enjoy significant productivity gains, while delivering feature-rich, standards-compliant and cross-browser compatible web applications. Features AJAX Technology KFileUploadPlusProgressBa r Control is new AJAX based Progress Bar for KUpload+, which takes full advantage of the AJAX Technology and the new features of Microsoft's next-generation IDE...

Since then, mailing lists, newsgroups, and web sites have sprung up containing a mixture of code samples, applications, and articles of various forms. Even if you're not a programmer using existing ASP technology, it's a good bet that you've at least heard of .NET, even if you aren't quite sure what it involves. After all, there's so much information about .NET, that it's sometimes hard to filter out what you need from what's available. With new languages, new designers, and new ways of programming, you might wonder exactly what you need to write ASP.NET applications.

A Sample Chapter from "Beginning ASP.NET using VB.NET". Topics covered include: Static Web Pages Dynamic Web Pages; An overview of the different technologies for creating dynamic web pages, including ASP.NET; Installing Internet Information Services (IIS); Installing the .NET Framework; and Testing and Troubleshooting your installation.

Now that we have developed our website, we need to deploy it � prepare and distribute the site so that users can access it.

The release of ASP.NET forces us to reconsider many preconceptions about the deployment of websites.


Programming an ASP.NET application is significantly different than programming in ASP.old. The difference can be likened to the change that occurred when moving from QuickBasic programming to Visual Basic programming.

Hi all, here are some quick tips to get you started, in case you need to migrate a J2EE based application to a .NET based application.

We approach the migration tier wise. Firstly, a technology mapping between both the platforms


In this article we will learn how to determine the size and dimensions ( width & height ) of an uploaded image? allow the image to be uploaded if it is less than given size? or if it's width and height are less than given values? and finally how to resize an image to create thumbnails?

The label "web services," as broadly applied, has two levels of meaning one specific and one conceptual:

Specifically, web services are a stack of emerging standards that describe a service-oriented, component-based application architecture.


Visual Basic .NET has not only extended the versatility of the Visual Basic language but also harnessed the power of the .NET framework, the new "Delegate" feature is one of them. So now you don't get the sneer of the self proclaimed C++ or Java programmers looking down on VB programmers as mere mortals!

Microsoft is set to release an exciting upgrade to ASP later in 2000. This is a major upgrade unlike the minor changes from ASP 2.0 to 3.0. Unlike past upgrades, however, this one will not be painless. When they designed ASP+, Microsoft had to make the hard decision occasionally to break backward compatibility in the interest of improved functionality and features.







What's New
Display Paged Recordset Data
GetRows VBScript Class - Part III: Paging the results
ASP & MySQL Record Paging
Ways to get Alphabetical Paging for your ASP scripts
Sorting Database Records
Recordset Paging Script
Paging through Records using a Stored Procedure
Paged Table Displays by Charles Carroll & Jeff Emrich
Recordset Paging with ADO 2.0
Fill A ComboBox with DB Information

Most Popular
Cross-Page Posting Example
Retrieving Column Names with values
How to modify expire date of a cookie
Storing and retrieving variables from application object
CGI Guestbook
Image downloading from remote servers in ASP
Displaying last modified date of any file
Generating random passwords
PHP control structures - do while
Extended GridView Control

Copyright © 2008 Powered by GNews Publisher Positive. All rights reserved. Contact Us - Load Time: 0.17 second(s)