Click here to Skip to main content
16,007,610 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Excel to MySQL Pin
Zafar A khan 8-Jul-09 0:12
professionalZafar A khan 8-Jul-09 0:12 
QuestionPreserving Checkbox values on changeevent of dynamically created textbox Pin
meeram3957-Jul-09 22:19
meeram3957-Jul-09 22:19 
QuestionDynamic controls Pin
KhandelwalA7-Jul-09 20:29
KhandelwalA7-Jul-09 20:29 
AnswerRe: Dynamic controls Pin
padmanabhan N7-Jul-09 20:36
padmanabhan N7-Jul-09 20:36 
GeneralRe: Dynamic controls Pin
KhandelwalA7-Jul-09 20:49
KhandelwalA7-Jul-09 20:49 
AnswerRe: Dynamic controls Pin
Zafar A khan 7-Jul-09 20:45
professionalZafar A khan 7-Jul-09 20:45 
GeneralRe: Dynamic controls Pin
KhandelwalA7-Jul-09 20:47
KhandelwalA7-Jul-09 20:47 
GeneralRe: Dynamic controls Pin
Zafar A khan 8-Jul-09 18:28
professionalZafar A khan 8-Jul-09 18:28 
i have tried the below code and i am getting the text from the text box.

i have generated the Textboxes in page_Load

and accessed the textbox text on button_Click

<table>
<tr>
<td colspan="2">
<asp:Panel ID="Panel1" runat="server" Height="200px" Width="125px">
</asp:Panel>
</td>
</tr>
<tr>
<td style="width: 100px">
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /></td>
<td style="width: 100px">
</td>
</tr>

</table>


Code.


protected void Page_Load(object sender, EventArgs e)
{
for (int i = 0; i < 4; i++)
{
TextBox t = new TextBox();
t.Width = Unit.Pixel(160);
t.Height = Unit.Pixel(22);
Panel1.Controls.Add(t);
}
}

protected void Button1_Click(object sender, EventArgs e)
{
string str = "";
foreach (Control ctrl in Panel1.Controls)
{
if (ctrl is TextBox)
{
TextBox t = (TextBox)ctrl;
str = t.Text;
}
}
}

i am getting the text i entered in the textboxes. In your case implement it as you required.
Question[Message Deleted] Pin
Bataineh7-Jul-09 20:28
Bataineh7-Jul-09 20:28 
AnswerRe: web.config error Pin
Abhijit Jana7-Jul-09 20:47
professionalAbhijit Jana7-Jul-09 20:47 
GeneralRe: web.config error [modified] Pin
Bataineh7-Jul-09 20:49
Bataineh7-Jul-09 20:49 
QuestionHow to Create Excel File and Adding multiple Tabs in ASP.net2.0 without Adding Reference Pin
vandanaconedify7-Jul-09 20:07
vandanaconedify7-Jul-09 20:07 
QuestionReading word document in asp.net 1.1 Pin
Spurple7-Jul-09 19:01
Spurple7-Jul-09 19:01 
AnswerRe: Reading word document in asp.net 1.1 Pin
N a v a n e e t h7-Jul-09 20:15
N a v a n e e t h7-Jul-09 20:15 
AnswerRe: Reading word document in asp.net 1.1 Pin
Abhijit Jana7-Jul-09 20:18
professionalAbhijit Jana7-Jul-09 20:18 
Questionpass the value from javascript to c# in asp.net Pin
billcodes7-Jul-09 18:58
billcodes7-Jul-09 18:58 
AnswerRe: pass the value from javascript to c# in asp.net Pin
himanshu25617-Jul-09 19:18
himanshu25617-Jul-09 19:18 
Questionvalidation Pin
mahichandu7-Jul-09 12:04
mahichandu7-Jul-09 12:04 
AnswerRe: validation Pin
Colin Angus Mackay7-Jul-09 12:09
Colin Angus Mackay7-Jul-09 12:09 
AnswerRe: validation Pin
Christian Graus7-Jul-09 15:55
protectorChristian Graus7-Jul-09 15:55 
GeneralRe: validation Pin
mahichandu8-Jul-09 3:05
mahichandu8-Jul-09 3:05 
QuestionRe: validation Pin
mahichandu8-Jul-09 3:12
mahichandu8-Jul-09 3:12 
AnswerRe: validation Pin
mahichandu8-Jul-09 8:37
mahichandu8-Jul-09 8:37 
QuestionConverting tiffs and other formats into PDF using ABCpdf or any other tools Pin
Tina P7-Jul-09 10:57
Tina P7-Jul-09 10:57 
AnswerRe: Converting tiffs and other formats into PDF using ABCpdf or any other tools Pin
Manas Bhardwaj7-Jul-09 11:09
professionalManas Bhardwaj7-Jul-09 11:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.