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 Grails
  Home |   Topics |   Search |   Login / Register |   Rss Feeds


Topics
» Classic ASP
» ASP.NET
» PHP/mySQL
» JSP/Servlet
» Ajax
» Ruby
» Python
» Cold Fusion
» Perl
» Grails
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: Saturday, July 31, 2010
Today Hit: 27
All Time Hit: 19174
Reviewed : 0 times
Voted : 0 times
Av. rating :
View tutorial
(0) posts Discuss (0 posts)      

More latest headlines in ASP.NET
In this article, Sergey examines the role of cross domain access policy in Silverlight. After a short introduction, he examines the interaction between client and server as well as a list of threats which may occur in rich internet applications. He also provides steps to take in order to prevent attacks and operation of Crossdomain Client Access Policy with the help of relevant screenshots and source code.

In this article, I will illustrate how LINQ makes the relation between objects and data easy to deal with. I will also use code samples to make a comparison between regular code and LINQ code.

Explore the process of creating the files to support DeepZoom composition (image pyramids and dz xml files). Assumes a basic understanding of deepzoom. The foundation for the article can be seen on my blog: problog.jamespritz.com.

This article describes the basics of developing an animation application using the Silverlight Application project found in Visual Studio 2008 SP1.

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








What's New
Cross domain access policy in Silverlight applications
LINQ the Bridge between the world of Objects & the world of Data
Dynamically creating DeepZoom composition
DoubleAnimation Basics with Silverlight Application
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

Most Popular
How to convert date to time and back
Build a SqlSitemapProvider Treeview Navigation Control with SqlCacheDependency
PHP Cookies Tutorial
Site Map and Bread Crumbs for your website
Adding Records to the Database
ADO, SQL, and data access tutorial
CodeSnip: How to Get Id of the Record Using ASP.NET and SQL Server 2000
Enhancing the DataGrid with Grouped Rows and Subheadings
More about Stored Procedures using ASP.NET 2.0 with the Microsoft Data Access Application Block
DataList Control

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