.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.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 ASP Free Forums Sponsor:
  #1  
Old May 22nd, 2003, 09:38 AM
alina alina is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 8 alina User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
get text from a textbox

I have a problem with getting a text from the textbox.<br> The textbox has a default text got from the Page_Load event. Then I change the text in the textbox and click a "Save" button. When I try to get the newly entered text in the button_Click event, I see that I still get the old (default) text. <br> How can I get the latest value of the textbox?<br> Please, any ideas......

Reply With Quote
  #2  
Old May 22nd, 2003, 11:21 AM
kshitij kshitij is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 7 kshitij User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi,<br><br>if Not IsPostBack<br><br>/// your code of assigning default value to text box<br><br>End If<br><br>put this code in your page load event.<br><br>All the best.<br><br>K****ij.

Reply With Quote
  #3  
Old May 22nd, 2003, 05:24 PM
jbwood jbwood is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 8 jbwood User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Where are you saving the information in the textbox?<br>SQL?<br>Access?<br><br>All you need to do is read the data from the datastore with a datareader and assign the textbox its value.<br><br>For instance, if its in sql, just get the value you want with a sql reader using <br><br>strSQL = "SELECT Value FROM table WHERE object = identifier"<br>use your connection pass the string, return the value<br><br>if you are using a datatable, its as easy as just using<br><br>if not ispostback<br> textbox.text = datatable.rows(0)("cell")<br>end if<br><br>Rows(0) is the returned single row of the select results, the cell is the name of the column in the database.<br><br>Hope this helps.

Reply With Quote
  #4  
Old May 31st, 2003, 02:48 PM
youness youness is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 23 youness User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sub Page_Load(Sender As Object, E As EventArgs)<br> if request.form("ur_textbox") <> "" then<br>message="ur text is : '"&request.form("ur_textbox")&"' "<br>else message="write ur new text"<br>end if<br> End Sub<br><br><br><br>hope this helps too

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > get text from a textbox


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT