.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 30th, 2003, 07:41 AM
boston_web boston_web is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 9 boston_web User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Biginner Question

Dear All,
I am biginner in ASP.NET
I have one query as Follows
In ASp.NET I want to post value into other file .how I do this?

Thanks
Boston_WEB

Reply With Quote
  #2  
Old September 30th, 2003, 10:46 AM
nopoints nopoints is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Windsor ON, Canada
Posts: 462 nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 14 h 1 m 30 sec
Reputation Power: 12
where is this value coming from and what is the file you want to post it to?
__________________
Programmer's Corner

Reply With Quote
  #3  
Old September 30th, 2003, 02:37 PM
emladris emladris is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: SC
Posts: 26 emladris User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Wink Your question is not very good:

Please remember, we cannot read your mind, or magically see your code.

What is your query? Are you using ADO or ADO.NET? What file do you want to post it to? Another form? A text file? A webservice?

Specifics will allow us to help you out much better!

Thanks!

Reply With Quote
  #4  
Old October 1st, 2003, 12:10 AM
boston_web boston_web is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 9 boston_web User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Dear all ,
first i have one one.aspx file this file content web form control.
through this file I want to post control's value to other two.aspx
how I post this value to other file

Thanks,
Boston

Reply With Quote
  #5  
Old October 1st, 2003, 09:17 AM
emladris emladris is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: SC
Posts: 26 emladris User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Wink Nice... Now we can help you!

Ok, so you want to communicate between forms in a web environment! This is quite simple.

FOR LEARNING: read about WEBFORMS from just about any source.

FOR IMPLEMENTATION:
On FORM1.ASPX you must ensure that you have a FORM tag within your HTML <FORM></FORM>. This form tag tells the system that you have a WEBFORM that you want to use. A WEBFORM's job is to gather data and post it somewhere.

The form tag will have attributes that tell the form where to post the data it has received. In ASP.NET it will look like this:

<form id="Form1" method="post" runat="server">

Inside of that FORM TAG you must have some sort of button element something like this:

<input type="submit" value="ButtonName" runat="Server" ID="Submit1" NAME="Submit1">

Now in your code behind page (if you don't know this, you really need to do some reading) you will have an event for this button, just like in VB, and you will act on that form and it's information. The trick here, is you really don't need to submit to another page, but you can. Here is a sample (button click) event:

Private Sub Submit1_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submit1.ServerClick
Dim Val1, Val2, Val3 As Integer
Val1 = textbox1.text
Val2 = textbox2.text
Val3 = Val1 + Val2
Response.Redirect("Page2.aspx?Val3=" & Val3)
End Sub

=========================================
Now this is just one example. There are actually several ways to do this stuff, all depending on what your desired outcome will be. Try reusing the same form, you will acutally have some really cool results. The form is automatically in POSTBACK mode. You can actually have it post all of it's results to another page, but that was really the OLD way of doing things in legacy ASP. Now with the advent of CODE BEHIND pages, you really are better off doing a postback, running your routines/functions then if you need, go to another form.


Good Luck!

Reply With Quote
  #6  
Old October 1st, 2003, 11:57 PM
boston_web boston_web is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 9 boston_web User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks emladris

Reply With Quote
  #7  
Old October 2nd, 2003, 10:57 AM
emladris emladris is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: SC
Posts: 26 emladris User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking Glad I could help out!

(and why am I still a junior member? hahahahaahaha!)

Reply With Quote
  #8  
Old October 3rd, 2003, 06:53 AM
Pain Pain is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Sheffield, UK
Posts: 94 Pain User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 10
Send a message via ICQ to Pain
you can use forms, query strings, cookies and one other (it escapes me at present but i'll track it down sooner or later..)

i'd have suggested cookies since they're real easy to learn how to implement..

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > Biginner Question

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap