473,382 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Posting to another page attribute: PostTargetUrl

Post Forwarding question......

For this control below,

<asp:Button runat="server" PostTargetUrl="page2.aspx" />

The Attribute: PostTargetUrl="page2.aspx"

Is this PostTargetUrl Attribute going to be available in the <a> and Html
Controls as well as opposed to just the <asp:Button> control?

Lots of other controls, HTML controls, <a>, <img>, etc, would like to used
to post forward....
Nov 22 '05 #1
6 891
Setting the form action attribute just isn't the ASP.NET way.

Of course there are a number of ways to pass values from one page to
another, such as using the querystring, cookies, session,
context, saving to a temporary table in the database between each page, etc.
You'll have to decide which technique is best for your application.
Here are several good articles on the subject to help you decide.
http://msdn.microsoft.com/msdnmag/is...e/default.aspx

http://www.aspalliance.com/kenc/passval.aspx

http://www.dotnetjunkies.com/tutoria...tutorialid=600

http://www.dotnetbips.com/displayarticle.aspx?id=79

Here's one nice, simple way to pass values from one page to another:

'Add data to the context object before transferring
Context.Items("myParameter") = x
Server.Transfer("WebForm2.aspx")

Then, in WebForm2.aspx:

'Grab data from the context property
Dim x as Integer = CType(Context.Items("myParameter"),Integer)

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"anon" <an**@hotmail.com> wrote in message
news:u2**************@tk2msftngp13.phx.gbl...
Post Forwarding question......

For this control below,

<asp:Button runat="server" PostTargetUrl="page2.aspx" />

The Attribute: PostTargetUrl="page2.aspx"

Is this PostTargetUrl Attribute going to be available in the <a> and Html
Controls as well as opposed to just the <asp:Button> control?

Lots of other controls, HTML controls, <a>, <img>, etc, would like to used
to post forward....

Nov 22 '05 #2
Yes, but setting the form action attribute is the BEST way to pass
information page to page.

<asp:Button runat="server" PostTargetUrl="page2.aspx" />
The Attribute: PostTargetUrl="page2.aspx"

It's fastest way and most simpliest way for form data next to like the
querystring.
It's definately K.I.S.S. type of architecture.
It's got the best performance on an enterprise level or any level for that
matter
And it works, plain and simple.

All of those other ways are messy hacks that have drawbacks one way or
another and can makes your code far far more complicated than what it should
be.

All the other languages can do it this way, except .NET and because of that,
it's a pain in the a** to get real life questionairre form data into a
database.

The fact that MS is addressing this issue head on is a testament to this
major major screwup

Now, let's get back to the ORIGINAL question... is PostTargetUrl going to be
in the other HTML controls? That's what's important here and let's not SCREW
it up like MS did with 1.0 and 1.1


"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:ug*************@TK2MSFTNGP11.phx.gbl...
Setting the form action attribute just isn't the ASP.NET way.

Of course there are a number of ways to pass values from one page to
another, such as using the querystring, cookies, session,
context, saving to a temporary table in the database between each page, etc. You'll have to decide which technique is best for your application.
Here are several good articles on the subject to help you decide.
http://msdn.microsoft.com/msdnmag/is...e/default.aspx
http://www.aspalliance.com/kenc/passval.aspx

http://www.dotnetjunkies.com/tutoria...tutorialid=600

http://www.dotnetbips.com/displayarticle.aspx?id=79

Here's one nice, simple way to pass values from one page to another:

'Add data to the context object before transferring
Context.Items("myParameter") = x
Server.Transfer("WebForm2.aspx")

Then, in WebForm2.aspx:

'Grab data from the context property
Dim x as Integer = CType(Context.Items("myParameter"),Integer)

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"anon" <an**@hotmail.com> wrote in message
news:u2**************@tk2msftngp13.phx.gbl...
Post Forwarding question......

For this control below,

<asp:Button runat="server" PostTargetUrl="page2.aspx" />

The Attribute: PostTargetUrl="page2.aspx"

Is this PostTargetUrl Attribute going to be available in the <a> and Html Controls as well as opposed to just the <asp:Button> control?

Lots of other controls, HTML controls, <a>, <img>, etc, would like to used to post forward....


Nov 22 '05 #3
I have to disagree with you. Processing forms is a simple matter now with
..NET and you no longer for to push people to another page just to save off
the data. That is something I would consider more of a hack.

In .NET it is a simple matter to respond to the OnClick event, which your
validators will have validated the form and you are ready to process that
data from simple server controls and store in the database. If any errors
occur you have not left he page yet and can update a status field on the
form informing them of the error while all their data is preserved. Once
the data is successfully stored, you simply do a transfer to send them to a
result page if you so desire or back to the main page.

It really does not get much easier than this. And the process keeps all
your server controls hooked for easy processing not to mention keeping your
code clean only having to deal with a single page. The processing of
regular form data has been a pain in the tush for over a decade!

--
Rocky Moore
www.HintsAndTips.com - Share your tips with the world!
~~~~~~~~~ Developer Tips Welcome! ~~~~~~~~~

"anon" <an**@hotmail.com> wrote in message
news:#9**************@TK2MSFTNGP12.phx.gbl...
Yes, but setting the form action attribute is the BEST way to pass
information page to page.

<asp:Button runat="server" PostTargetUrl="page2.aspx" />
The Attribute: PostTargetUrl="page2.aspx"

It's fastest way and most simpliest way for form data next to like the
querystring.
It's definately K.I.S.S. type of architecture.
It's got the best performance on an enterprise level or any level for that
matter
And it works, plain and simple.

All of those other ways are messy hacks that have drawbacks one way or
another and can makes your code far far more complicated than what it should be.

All the other languages can do it this way, except .NET and because of that, it's a pain in the a** to get real life questionairre form data into a
database.

The fact that MS is addressing this issue head on is a testament to this
major major screwup

Now, let's get back to the ORIGINAL question... is PostTargetUrl going to be in the other HTML controls? That's what's important here and let's not SCREW it up like MS did with 1.0 and 1.1


"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:ug*************@TK2MSFTNGP11.phx.gbl...
Setting the form action attribute just isn't the ASP.NET way.

Of course there are a number of ways to pass values from one page to
another, such as using the querystring, cookies, session,
context, saving to a temporary table in the database between each page,

etc.
You'll have to decide which technique is best for your application.
Here are several good articles on the subject to help you decide.

http://msdn.microsoft.com/msdnmag/is...e/default.aspx

http://www.aspalliance.com/kenc/passval.aspx

http://www.dotnetjunkies.com/tutoria...tutorialid=600

http://www.dotnetbips.com/displayarticle.aspx?id=79

Here's one nice, simple way to pass values from one page to another:

'Add data to the context object before transferring
Context.Items("myParameter") = x
Server.Transfer("WebForm2.aspx")

Then, in WebForm2.aspx:

'Grab data from the context property
Dim x as Integer = CType(Context.Items("myParameter"),Integer)

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"anon" <an**@hotmail.com> wrote in message
news:u2**************@tk2msftngp13.phx.gbl...
Post Forwarding question......

For this control below,

<asp:Button runat="server" PostTargetUrl="page2.aspx" />

The Attribute: PostTargetUrl="page2.aspx"

Is this PostTargetUrl Attribute going to be available in the <a> and Html Controls as well as opposed to just the <asp:Button> control?

Lots of other controls, HTML controls, <a>, <img>, etc, would like to used to post forward....



Nov 22 '05 #4
This where you are really clueless in the real world.

First, if you have a decent size form page and your post right back to the
same page, the user can't find where the mistake is; especially is every
other things is marked in red, *required

Forms that are challenging also span several pages long....if you have a
single page, that's a complete nightmare anyway you look at it.

Second, IIS logging tells a lot without having to do this at a
database...doing it your way is a perfomance hit.

Third, the validation controls are pointless, they are not practically in
the real world...maybe a simple for like signing up for a Hotmail account is
good for you. But that form asks your for hardly any important information
anyway.

Fourth, if you have any important information to be inserted into a database
it still has to validated service side anyway.

It pays to have a separate validation page that can be a lot more
intelligent to tell the users what's wrong and also on the server to
initialize more validation routines for security hacks and more help for the
user.

I can go on and on, but I don't....almost ALL .NET top notch guru authors
developers SUCK at web development anyway......they have poor user interface
skills and can't communicate to the common user if their life depended upon
it....look at the failure of adoption of ASP.NET in the real world...Mr.
Gates said it himself..".NET is slow going" and took 3 years to get to this
point to have a decent list of .NET examples.

The fact that Microsoft's ASP.NET 2.0 is directly addressing this need to
post to another page shows you how clueless you are to REAL life business
web application and I am glad they, Microsoft, isn't listening to you or the
MVP's, .NET authors and the like, who PREACHED over and over again the the
complete stupidity of Postback. Now, they have to eat HUMBLE PIE.....


"Rocky Moore" <gR*********@hintsandtips.com> wrote in message
news:er**************@TK2MSFTNGP12.phx.gbl...
I have to disagree with you. Processing forms is a simple matter now with
.NET and you no longer for to push people to another page just to save off
the data. That is something I would consider more of a hack.

In .NET it is a simple matter to respond to the OnClick event, which your
validators will have validated the form and you are ready to process that
data from simple server controls and store in the database. If any errors
occur you have not left he page yet and can update a status field on the
form informing them of the error while all their data is preserved. Once
the data is successfully stored, you simply do a transfer to send them to a result page if you so desire or back to the main page.

It really does not get much easier than this. And the process keeps all
your server controls hooked for easy processing not to mention keeping your code clean only having to deal with a single page. The processing of
regular form data has been a pain in the tush for over a decade!

--
Rocky Moore
www.HintsAndTips.com - Share your tips with the world!
~~~~~~~~~ Developer Tips Welcome! ~~~~~~~~~

"anon" <an**@hotmail.com> wrote in message
news:#9**************@TK2MSFTNGP12.phx.gbl...
Yes, but setting the form action attribute is the BEST way to pass
information page to page.

<asp:Button runat="server" PostTargetUrl="page2.aspx" />
The Attribute: PostTargetUrl="page2.aspx"

It's fastest way and most simpliest way for form data next to like the
querystring.
It's definately K.I.S.S. type of architecture.
It's got the best performance on an enterprise level or any level for that matter
And it works, plain and simple.

All of those other ways are messy hacks that have drawbacks one way or
another and can makes your code far far more complicated than what it should
be.

All the other languages can do it this way, except .NET and because of

that,
it's a pain in the a** to get real life questionairre form data into a
database.

The fact that MS is addressing this issue head on is a testament to this
major major screwup

Now, let's get back to the ORIGINAL question... is PostTargetUrl going to be
in the other HTML controls? That's what's important here and let's not

SCREW
it up like MS did with 1.0 and 1.1


"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:ug*************@TK2MSFTNGP11.phx.gbl...
Setting the form action attribute just isn't the ASP.NET way.

Of course there are a number of ways to pass values from one page to
another, such as using the querystring, cookies, session,
context, saving to a temporary table in the database between each page, etc.
You'll have to decide which technique is best for your application.
Here are several good articles on the subject to help you decide.

http://msdn.microsoft.com/msdnmag/is...e/default.aspx
http://www.aspalliance.com/kenc/passval.aspx

http://www.dotnetjunkies.com/tutoria...tutorialid=600

http://www.dotnetbips.com/displayarticle.aspx?id=79

Here's one nice, simple way to pass values from one page to another:

'Add data to the context object before transferring
Context.Items("myParameter") = x
Server.Transfer("WebForm2.aspx")

Then, in WebForm2.aspx:

'Grab data from the context property
Dim x as Integer = CType(Context.Items("myParameter"),Integer)

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"anon" <an**@hotmail.com> wrote in message
news:u2**************@tk2msftngp13.phx.gbl...
> Post Forwarding question......
>
> For this control below,
>
> <asp:Button runat="server" PostTargetUrl="page2.aspx" />
>
> The Attribute: PostTargetUrl="page2.aspx"
>
> Is this PostTargetUrl Attribute going to be available in the <a> and

Html
> Controls as well as opposed to just the <asp:Button> control?
>
> Lots of other controls, HTML controls, <a>, <img>, etc, would like
to used
> to post forward....
>
>



Nov 22 '05 #5
Personally, I agree with you.

There are times where I designed asp forms that posted back to themselves,
just like Asp.net where they'd detect IsPostBack and process form variables
accordingly.

However, there is always the OTHER way, whereas you collect information and
pass that info on to ANOTHER form for processing... SEARCHING comes to
mind...

For example, when you want to search based on Mfr Part Number, you'd submit
search parameters to a form that specialized in displaying and sorting via
MANUFACTURERS, another scenario would be to search by Stocks, stock symbol
vs company name... the form "posted" to would specialize on helping you find
either the stock SYMBOL you're looking for, or a company name, and THEN the
stock symbol, which probably would post back to an original "quote display"
form that specialized only in displaying quotes.

the asp.net postback mentality has been both nice AND problematic

so I agree with "anon" in that it was a screwup only to force EVERYBODY to
run through a "new" model, and ONLY that "new" model
--
Eric Newton
eric.at.ensoft-software.com
www.ensoft-software.com
C#/ASP.net Solutions developer

"anon" <an**@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Yes, but setting the form action attribute is the BEST way to pass
information page to page.

<asp:Button runat="server" PostTargetUrl="page2.aspx" />
The Attribute: PostTargetUrl="page2.aspx"

It's fastest way and most simpliest way for form data next to like the
querystring.
It's definately K.I.S.S. type of architecture.
It's got the best performance on an enterprise level or any level for that
matter
And it works, plain and simple.

All of those other ways are messy hacks that have drawbacks one way or
another and can makes your code far far more complicated than what it should be.

All the other languages can do it this way, except .NET and because of that, it's a pain in the a** to get real life questionairre form data into a
database.

The fact that MS is addressing this issue head on is a testament to this
major major screwup

Now, let's get back to the ORIGINAL question... is PostTargetUrl going to be in the other HTML controls? That's what's important here and let's not SCREW it up like MS did with 1.0 and 1.1


"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:ug*************@TK2MSFTNGP11.phx.gbl...
Setting the form action attribute just isn't the ASP.NET way.

Of course there are a number of ways to pass values from one page to
another, such as using the querystring, cookies, session,
context, saving to a temporary table in the database between each page,

etc.
You'll have to decide which technique is best for your application.
Here are several good articles on the subject to help you decide.

http://msdn.microsoft.com/msdnmag/is...e/default.aspx

http://www.aspalliance.com/kenc/passval.aspx

http://www.dotnetjunkies.com/tutoria...tutorialid=600

http://www.dotnetbips.com/displayarticle.aspx?id=79

Here's one nice, simple way to pass values from one page to another:

'Add data to the context object before transferring
Context.Items("myParameter") = x
Server.Transfer("WebForm2.aspx")

Then, in WebForm2.aspx:

'Grab data from the context property
Dim x as Integer = CType(Context.Items("myParameter"),Integer)

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"anon" <an**@hotmail.com> wrote in message
news:u2**************@tk2msftngp13.phx.gbl...
Post Forwarding question......

For this control below,

<asp:Button runat="server" PostTargetUrl="page2.aspx" />

The Attribute: PostTargetUrl="page2.aspx"

Is this PostTargetUrl Attribute going to be available in the <a> and Html Controls as well as opposed to just the <asp:Button> control?

Lots of other controls, HTML controls, <a>, <img>, etc, would like to used to post forward....



Nov 22 '05 #6
Nobody forces you to specify runat server for any form or control.

So for anything like "search" functionality i am using exactly the same way
as i would use in ASP.

<form target="searchresult.aspx"><input type="text" name="word"></form>

And i do not have any problem.

And i can not aggree with you that ASP.NET forces to anyhting.

You can always use ASP model (without post backs) with ASP.NET exaclty the
same way as you would with ASP.

George.
"Eric Newton" <er**@ensoft-software.com> wrote in message
news:ev**************@TK2MSFTNGP12.phx.gbl...
Personally, I agree with you.

There are times where I designed asp forms that posted back to themselves,
just like Asp.net where they'd detect IsPostBack and process form variables accordingly.

However, there is always the OTHER way, whereas you collect information and pass that info on to ANOTHER form for processing... SEARCHING comes to
mind...

For example, when you want to search based on Mfr Part Number, you'd submit search parameters to a form that specialized in displaying and sorting via
MANUFACTURERS, another scenario would be to search by Stocks, stock symbol
vs company name... the form "posted" to would specialize on helping you find either the stock SYMBOL you're looking for, or a company name, and THEN the stock symbol, which probably would post back to an original "quote display" form that specialized only in displaying quotes.

the asp.net postback mentality has been both nice AND problematic

so I agree with "anon" in that it was a screwup only to force EVERYBODY to
run through a "new" model, and ONLY that "new" model
--
Eric Newton
eric.at.ensoft-software.com
www.ensoft-software.com
C#/ASP.net Solutions developer

"anon" <an**@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Yes, but setting the form action attribute is the BEST way to pass
information page to page.

<asp:Button runat="server" PostTargetUrl="page2.aspx" />
The Attribute: PostTargetUrl="page2.aspx"

It's fastest way and most simpliest way for form data next to like the
querystring.
It's definately K.I.S.S. type of architecture.
It's got the best performance on an enterprise level or any level for that matter
And it works, plain and simple.

All of those other ways are messy hacks that have drawbacks one way or
another and can makes your code far far more complicated than what it should
be.

All the other languages can do it this way, except .NET and because of

that,
it's a pain in the a** to get real life questionairre form data into a
database.

The fact that MS is addressing this issue head on is a testament to this
major major screwup

Now, let's get back to the ORIGINAL question... is PostTargetUrl going to be
in the other HTML controls? That's what's important here and let's not

SCREW
it up like MS did with 1.0 and 1.1


"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:ug*************@TK2MSFTNGP11.phx.gbl...
Setting the form action attribute just isn't the ASP.NET way.

Of course there are a number of ways to pass values from one page to
another, such as using the querystring, cookies, session,
context, saving to a temporary table in the database between each page, etc.
You'll have to decide which technique is best for your application.
Here are several good articles on the subject to help you decide.

http://msdn.microsoft.com/msdnmag/is...e/default.aspx
http://www.aspalliance.com/kenc/passval.aspx

http://www.dotnetjunkies.com/tutoria...tutorialid=600

http://www.dotnetbips.com/displayarticle.aspx?id=79

Here's one nice, simple way to pass values from one page to another:

'Add data to the context object before transferring
Context.Items("myParameter") = x
Server.Transfer("WebForm2.aspx")

Then, in WebForm2.aspx:

'Grab data from the context property
Dim x as Integer = CType(Context.Items("myParameter"),Integer)

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"anon" <an**@hotmail.com> wrote in message
news:u2**************@tk2msftngp13.phx.gbl...
> Post Forwarding question......
>
> For this control below,
>
> <asp:Button runat="server" PostTargetUrl="page2.aspx" />
>
> The Attribute: PostTargetUrl="page2.aspx"
>
> Is this PostTargetUrl Attribute going to be available in the <a> and

Html
> Controls as well as opposed to just the <asp:Button> control?
>
> Lots of other controls, HTML controls, <a>, <img>, etc, would like
to used
> to post forward....
>
>



Nov 22 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: anon | last post by:
Post Forwarding question...... For this control below, <asp:Button runat="server" PostTargetUrl="page2.aspx" /> The Attribute: PostTargetUrl="page2.aspx" Is this PostTargetUrl Attribute...
32
by: Eli | last post by:
How can I POST a form into a new window where I control the size and other attributes of the new window? Also. Are there any implications, perhaps due to browser security (Interne Explorer?)...
3
by: Carl Lindmark | last post by:
*Cross-posting from microsoft.public.dotnet.languages.csharp, since I believe the question is better suited in this XML group* Hello all, I'm having some problems understanding all the ins and...
5
by: Magnus | last post by:
Hi! This is my problem: I want to go from page1 to page2, and to get all the form variables from page1 to page2. I have turned the viewstate and the sessionstate off, and i really just...
4
by: Ivan Demkovitch | last post by:
Hi! I have Portal application which is on http. However I like to do user authentification using SSL I like approach most sites use: They have <form name="loginForm" action="https://sss"...
7
by: Matt | last post by:
Hi all, Not very sure about this. I have one button (not a submit button) will "post" partial page(form) info to another url(the user will also redirect to this url :-). I dont' want to change...
3
by: qwerty | last post by:
I´m new to ASP.Net. My workmate has some experience with it. He claimed that in ASP.Net working with frames is much simpler than it was ASP. I asked explanation but he couldn't give me such. (a...
3
by: Adam Knight | last post by:
Hi all, I have a form that i want to benefit from aspx functionality (ie: viewstate, validation). However for the posting of the form, i want to simply transfer execution to another script. ...
6
by: Andrew | last post by:
Hello, friends, I tried to do cross-page posting, i.e., in firstpage.aspx I used action="secondpage.aspx". Since I am using asp.net 1.1, so it always goes back to firstpage.aspx aftern...
1
by: Basil Eliopoulos | last post by:
I need to be able to create a class in C# that will allow me to navigate to a public website "www.arin.net" (American Registry for Internet Numbers). The web page has a single text box where I can...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.