473,326 Members | 2,023 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,326 software developers and data experts.

ASP 2.0 (link) button question

Hi,I'm new on this forum,and I'm new i ASP.net,

so I've got question:

is it possible in ASP to click on button or to click on LinkButton and when button is clicked on other page program build TextBox (before clicking button TextBox on other page doesent exist),and when user clicks the button 10 times, ten TextBoxes will be shown, if it is possible, how?


For creating button on other page I used this code (code is in VB.Net but I'll prefer answer in C# if it is possible):

Expand|Select|Wrap|Line Numbers
  1. Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.  
  3. Session("text") = True
  4.  
  5. Response.Redirect("Deafult2.aspx")
  6.  
  7. End Sub
  8.  
  9.  
  10. Page2:
  11.  
  12. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  13.  
  14. If Session("text") = True Then
  15. Dim text As New TextBox
  16. Panel1.Controls.Add(text)
  17.  
  18. End If
  19.  
  20. End Sub
  21.  
This code works for adding just one TextBox, but if I click it 10 times it will just create 1 TextBox, I' ve tried to do it by For ... Next loop but it didn't help.

I hope I've explained my problem well.

Many thanks.
May 5 '07 #1
2 1050
kenobewan
4,871 Expert 4TB
This wil probably work best using an incremental counter that adds 1 each time the button is clicked. HTH.
May 5 '07 #2
Sorry what I'm bothering you,but I'm new in programing,and I don't like to ask this,but can you please write that code for me,I' ve 3 days tried hard to do this,but I
cud not do it,an lot of things depends on this.
May 6 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Stanimir Stamenkov | last post by:
Here's an example: <form action="bogus" method="post"> <p> <a href="prev.cgi"><input type="submit" name="prev" value="< Back"></a> <a href="next.cgi"><input type="submit" name="next"...
3
by: rachel | last post by:
Hi all, I am new in ASP.Net. I have a question on link multiple web forms together. Here is the scenario: I create an Index.aspx WebForm which consists of a banner and three navigator...
3
by: Chris Wilkinson | last post by:
Hi there, I'm creating a frames website, which consists of a nav bar down the left of the screen (name="frame1") and a content frame filling the right hand side (name="frame2"). I've used nice...
6
by: nntp | last post by:
I have a set of links which I want search engines to crawl them, but I want to disable them from my visitors, so I will ask the link owners to pay me to let me enable them. <a disabled...
7
by: ravey | last post by:
I would like to use a Form "button" (or "input", either one) within an anchor, instead of using text or creating a graphic. This works fine in all browsers but IE, but IE, while showing the...
1
by: Darren Clark | last post by:
I have a link button that i would like to be used if the value of the text is NOT 0... So the code below will always make a linkbutton.... However if the value of...
4
by: WebBuilder451 | last post by:
I have about 20 link buttons that i need handled by one sub. I don't want to have 20 onClick_xxx subs or onCommand subs. I'm not having much luck calling a single sub for all the button or figuring...
26
by: Mica Cooper | last post by:
Hi, I need to pass some info in a javascript submit. <a href="javascript:document.formName.submit();">Submit Form</a> Normally a link would do page.jsp?x1=1&x2=2&x3=3 and you would pull x1,...
5
by: Amoril | last post by:
I've read quite a few different message on various boards and for some reason I'm still having trouble wrapping my head around this viewstate maintenance and trying to get these dynamically created...
6
by: liketofindoutwhy | last post by:
There is a link that encloses a span (or a div), but the link won't work in IE 7 (clicking on video image works, but not on the play button), while it works well in Firefox 2 and 3, and Safari 3....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.