|
ok..
sorry being so newbie
one more question please:
when i redirect to page2.aspx is it possible to get the value of the field with Request.Form["tName"] in order to insert it in a Db?
|
|
|
|
|
Not if you redirect. You could store it into a Session variable, but it is probably better to do a Server.Transfer("page2.aspx") instead of Redirect than. If you do the transfer you will be able to do Request.Form("...") in the other page.
|
|
|
|
|
ok thanx for all your help... i'll try some stuff with your tips and if i have more questions i'll post them ok? thanx again
|
|
|
|
|
Hi All !
I know a best domain & hosting services
Domain $15/year , Hosting $1/month at www.clicknhost.com
Kalaji
|
|
|
|
|
What happened to the HTML/CSS Article section? I cannot find it in the left hand bar on the home page. The folders still exist (I checked my first article and it was still there.)
Am I just missing it? Also ASP is not there, though I guess ASP is being put into the .NET section.
Still, what happened to the HTML/CSS Article section?
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
Martin Marvinski wrote:
Unfortunatly Deep Throat isn't my cup of tea
Do you Sonork? I do! 100.9903 Stormfront
|
|
|
|
|
Everything is sill there as far as I can see. I think you need to select All Topics tab to see it.
What I want to know is what happened to article submission wizard. It says it is temporary unavailable. I have an article to submit and now I am not sure if I should just email it to Chris or wait for wizard to come back. The thing is that I don't know if it is down for a long time now or is it just today or what...
|
|
|
|
|
Konstantin Vasserman wrote:
I think you need to select All Topics tab to see it.
Aahhhh Thanks Konstantin.
Konstantin Vasserman wrote:
What I want to know is what happened to article submission wizard
Me too, was about to submit a second article and found the wizard down. I assume Chris is improving it no end So the wait, not sure how long, should be worth it.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
Martin Marvinski wrote:
Unfortunatly Deep Throat isn't my cup of tea
Do you Sonork? I do! 100.9903 Stormfront
|
|
|
|
|
Paul Watson wrote:
Me too, was about to submit a second article and found the wizard down. I assume Chris is improving it no end So the wait, not sure how long, should be worth it.
Well, according to Chris there is a problem with it that they are trying to fix and they hope to get it working soon. So we'll just wait. Maybe I should write another article while waiting - I still have 20 more to go to get my platinum membership status...
|
|
|
|
|
Hai,
Its surprising me, that no one discusses about the traditional . It didnt work. Because the submit button always tries to call the Page_Load function of the same page.
Surprising enough, none of Microsoft's documentation discusses about the action attribute. Wondering whether it is not required since the form itself is running on the server.
Then how would I jump to a different page?
omkamal
|
|
|
|
|
Doesn't Response.Redirect() work anymore?
|
|
|
|
|
But why do I want to use Redirect? Why not posting form values to a different page by calling that page? Like what we used to do in ASP.
omkamal
|
|
|
|
|
In ASP it was a different story: you had one page with HTML form and one page with ASP code to process the data. Now you can do it all in one page without creating a mess out of your code and without having all those extra pages. That is one of the good things about ASP.NET, as far as I concern...
|
|
|
|
|
Lets say I have a login form. It takes username and password and based on this authentication I would have to display (possibly in another page) an xml data in a datagrid. Now how would I do this all in one page. I cannot play hide-seek with my controls in the page. I would rather have it in a different page. Am I right?
omkamal
|
|
|
|
|
Before:
login form submitted to page2.asp
page2.asp checks credentials
if credentials not valid you send them back to login.asp
if valid you return XML.
Now:
login.asp submits to itself
you check credentials on page_load or button_clicked
if credentials not valid you do nothing
if valid you send them to page2.asp via Redirect.
All the code that relates to logging in is now in one place and not spread across multiple pages. All the code that concerns displaying of the XML is in the separate page. Much cleaner solution IMO.
|
|
|
|
|
Sounds great though. But my surprise is, what if I wanted login info in my page2.aspx? What is the use of HttpRequest class in .NET? What is the use of NameValue collection then?
If I check the credentials in the same page (page1.aspx), then I dont need to access the formcollection. I can simply use the ids of these controls right?
So, Is Response.Redirect() the ONLY way to jump to a different page in ASP.NET????
omkamal
|
|
|
|
|
If you want login info in page2.aspx you will probably want it in many more other pages. Just store it in Session variable and check this variable in every page.
Yes since your page1.asp doing all the login stuff you can refer to username textbox as if it was a server object:
if( txtUsername.Text == "blah" )
or
If txtUsername.Text = "blah" Then
you don't have to do Request.Form() stuff.
Server.Transfer() is better than Response.Redirect() because it does not do a round trip to client and back it just transfers control to another page.
|
|
|
|
|
BTW, you can still use client side forms as before just take out runat="server" part in your form tag. But you will not be able to take advantage of all the server side ASP components.
|
|
|
|
|
Now, are we concluding that posting form collection to a different aspx page is not possible???? Thats bad.
May be my login info is needed in different other pages so I can use session variables. But what if I have one variable that I need it only for page2.aspx. I dont have to go to session variable.
Ok. Lets give this up. If you find any info about sending values to a different page please let me know and so do I.
Thanks.
omkamal
|
|
|
|
|
Forms Authentication is now built in to asp.net
you can read about it here:
http://www.gotdotnet.com/quickstart/aspplus/doc/formsauth.aspx
|
|
|
|
|
omkamal wrote:
Then how would I jump to a different page?
Ok if all you want to do is jump to a different page then use response.redirect(), use a normal hyperlink or use javascript.
But I think you mean you want to submit a form, carry over the form data and process it on another page.
Your problem is that you are trying to apply ASP thinking to ASP.NET. The biggest bonus of ASP.NET is that it handles "state" for you. You build a form as per normal, don't worry about the action attribute though, and the submit button is then linked to a procedure (when you build your form just double click the submit button, in the IDE, and you will see). In the procedure you have the code which handles the form data. I just type "strFirstName = frmMain.txtFirstName" in the procedure and it works. ASP.NET handles it all for you.
I recommend you go through The ASP.NET Page Life Cycle and ASP.NET Code Behind Pages, and remember to stop thinking in old ASP terms. ASP.NET is rather different, and RATHER better
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
Martin Marvinski wrote:
Unfortunatly Deep Throat isn't my cup of tea
Do you Sonork? I do! 100.9903 Stormfront
|
|
|
|
|
I will certainly give this a try and go through the links that you have sent me. Thanks in advance. But I just wanted to also tell you that I am not using VS.NET beta 2. I am using a text editor to write the code.
omkamal
|
|
|
|
|
omkamal wrote:
I am using a text editor to write the code.
Welcome to the club. Notepad is my best friend.
|
|
|
|
|
If you still want to use a form to post data to a separate page. Insteand of using a button that has runat="server" just use a regular submit button. It can be found under the HTML tab in the editor or use insert <INPUT type="submit" value="Submit"> inside the form tags. It will act as the submit button used to. Sorry I caught this post late.
Joshua
Sonork ID: 100.9944
ICQ: 519642
Hotmail: JoshuaJGuy@hotmail.com
|
|
|
|
|
I'm running on NT4.0sp6 and I recently installed MDAC 2.6. Then I opened an old Web project inside Visual Interdev to find that calls to Server.CreateObject("ADODB.Connection") fail with
"ActiveX component can't create object."
What's going on? I even tried passing "ADODB.Connection.2.6" to CreateObject to no avail. I have a stand-alone VB project that uses ADO and that still works.
My guess is that I need to reinstall something. If so, what exactly?
Thanks,
Alvaro
|
|
|
|
|
Is there a way of quickly finding out which element on the form has the focus?
Happy programming!!
|
|
|
|