473,385 Members | 1,907 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,385 software developers and data experts.

HELP... Advanced Form... Need Guru

I have asked this question several times and can't seem to get the answer I
am looking for!

I am trying to create a form that responds dynamically to the users choises
within the page. At the moment I have a dropdownlist that has the values 1-10
in it. What I want to happen is that when the user selects one of the
values... lets say 3! Three parts of the form are repeated! This means that
the three parts of the forms input id's have to be unique!

Simple Code Example:

<asp:dropdownlist id="NoAccounts" runat="server"></asp:dropdownlist>

'Repeat code
<asp:textbox id="fldMobPhoneNo" runat="server"</asp:textbox><br>
<asp:textbox id="fldHomePhoneNo" runat="server"</asp:textbox><br>
<asp:dropdownlist id="ServicePro" runat="server"></asp:dropdownlist>
'End Repeat code

I thought I would put the repeat code in a user control and pull in the user
control as many times as required according to the selection from the
dropdownlist. However I'm not 100% sure how to change all the id's of the
textboxes especially considering the form I'm using is much more advanced
than that show above!

I would really, really appritiate any advice from one of you guru's out
there!

Thanks!
Nov 19 '05 #1
4 1111
Going with a user control is a good approach (although there are other
potentially good approaches too.)
You shouldn't run into naming conflicts because each user control can act as
it's own naming container, meaning ASP.NET will ensure they each have unique
IDs.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Tim::.." <myatix_at_hotmail.com> wrote in message
news:13**********************************@microsof t.com...
I have asked this question several times and can't seem to get the answer I
am looking for!

I am trying to create a form that responds dynamically to the users
choises
within the page. At the moment I have a dropdownlist that has the values
1-10
in it. What I want to happen is that when the user selects one of the
values... lets say 3! Three parts of the form are repeated! This means
that
the three parts of the forms input id's have to be unique!

Simple Code Example:

<asp:dropdownlist id="NoAccounts" runat="server"></asp:dropdownlist>

'Repeat code
<asp:textbox id="fldMobPhoneNo" runat="server"</asp:textbox><br>
<asp:textbox id="fldHomePhoneNo" runat="server"</asp:textbox><br>
<asp:dropdownlist id="ServicePro" runat="server"></asp:dropdownlist>
'End Repeat code

I thought I would put the repeat code in a user control and pull in the
user
control as many times as required according to the selection from the
dropdownlist. However I'm not 100% sure how to change all the id's of the
textboxes especially considering the form I'm using is much more advanced
than that show above!

I would really, really appritiate any advice from one of you guru's out
there!

Thanks!

Nov 19 '05 #2
Thanks Steve!

How about when I come to post the values? Do I need to do anything special
seeing as a part of the forms user id's are contained in usercontrols!

Thanks

"Steve C. Orr [MVP, MCSD]" wrote:
Going with a user control is a good approach (although there are other
potentially good approaches too.)
You shouldn't run into naming conflicts because each user control can act as
it's own naming container, meaning ASP.NET will ensure they each have unique
IDs.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Tim::.." <myatix_at_hotmail.com> wrote in message
news:13**********************************@microsof t.com...
I have asked this question several times and can't seem to get the answer I
am looking for!

I am trying to create a form that responds dynamically to the users
choises
within the page. At the moment I have a dropdownlist that has the values
1-10
in it. What I want to happen is that when the user selects one of the
values... lets say 3! Three parts of the form are repeated! This means
that
the three parts of the forms input id's have to be unique!

Simple Code Example:

<asp:dropdownlist id="NoAccounts" runat="server"></asp:dropdownlist>

'Repeat code
<asp:textbox id="fldMobPhoneNo" runat="server"</asp:textbox><br>
<asp:textbox id="fldHomePhoneNo" runat="server"</asp:textbox><br>
<asp:dropdownlist id="ServicePro" runat="server"></asp:dropdownlist>
'End Repeat code

I thought I would put the repeat code in a user control and pull in the
user
control as many times as required according to the selection from the
dropdownlist. However I'm not 100% sure how to change all the id's of the
textboxes especially considering the form I'm using is much more advanced
than that show above!

I would really, really appritiate any advice from one of you guru's out
there!

Thanks!


Nov 19 '05 #3
I don't think so, but I don't understand your project as well as you do...

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Tim::.." <myatix_at_hotmail.com> wrote in message
news:DE**********************************@microsof t.com...
Thanks Steve!

How about when I come to post the values? Do I need to do anything special
seeing as a part of the forms user id's are contained in usercontrols!

Thanks

"Steve C. Orr [MVP, MCSD]" wrote:
Going with a user control is a good approach (although there are other
potentially good approaches too.)
You shouldn't run into naming conflicts because each user control can act
as
it's own naming container, meaning ASP.NET will ensure they each have
unique
IDs.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Tim::.." <myatix_at_hotmail.com> wrote in message
news:13**********************************@microsof t.com...
>I have asked this question several times and can't seem to get the
>answer I
> am looking for!
>
> I am trying to create a form that responds dynamically to the users
> choises
> within the page. At the moment I have a dropdownlist that has the
> values
> 1-10
> in it. What I want to happen is that when the user selects one of the
> values... lets say 3! Three parts of the form are repeated! This means
> that
> the three parts of the forms input id's have to be unique!
>
> Simple Code Example:
>
> <asp:dropdownlist id="NoAccounts" runat="server"></asp:dropdownlist>
>
> 'Repeat code
> <asp:textbox id="fldMobPhoneNo" runat="server"</asp:textbox><br>
> <asp:textbox id="fldHomePhoneNo" runat="server"</asp:textbox><br>
> <asp:dropdownlist id="ServicePro" runat="server"></asp:dropdownlist>
> 'End Repeat code
>
> I thought I would put the repeat code in a user control and pull in the
> user
> control as many times as required according to the selection from the
> dropdownlist. However I'm not 100% sure how to change all the id's of
> the
> textboxes especially considering the form I'm using is much more
> advanced
> than that show above!
>
> I would really, really appritiate any advice from one of you guru's out
> there!
>
> Thanks!
>
>


Nov 19 '05 #4
You could of course add the server controls programmatically from the code
behind.

Leo
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I don't think so, but I don't understand your project as well as you do...

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Tim::.." <myatix_at_hotmail.com> wrote in message
news:DE**********************************@microsof t.com...
Thanks Steve!

How about when I come to post the values? Do I need to do anything
special
seeing as a part of the forms user id's are contained in usercontrols!

Thanks

"Steve C. Orr [MVP, MCSD]" wrote:
Going with a user control is a good approach (although there are other
potentially good approaches too.)
You shouldn't run into naming conflicts because each user control can
act as
it's own naming container, meaning ASP.NET will ensure they each have
unique
IDs.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Tim::.." <myatix_at_hotmail.com> wrote in message
news:13**********************************@microsof t.com...
>I have asked this question several times and can't seem to get the
>answer I
> am looking for!
>
> I am trying to create a form that responds dynamically to the users
> choises
> within the page. At the moment I have a dropdownlist that has the
> values
> 1-10
> in it. What I want to happen is that when the user selects one of the
> values... lets say 3! Three parts of the form are repeated! This means
> that
> the three parts of the forms input id's have to be unique!
>
> Simple Code Example:
>
> <asp:dropdownlist id="NoAccounts" runat="server"></asp:dropdownlist>
>
> 'Repeat code
> <asp:textbox id="fldMobPhoneNo" runat="server"</asp:textbox><br>
> <asp:textbox id="fldHomePhoneNo" runat="server"</asp:textbox><br>
> <asp:dropdownlist id="ServicePro" runat="server"></asp:dropdownlist>
> 'End Repeat code
>
> I thought I would put the repeat code in a user control and pull in
> the
> user
> control as many times as required according to the selection from the
> dropdownlist. However I'm not 100% sure how to change all the id's of
> the
> textboxes especially considering the form I'm using is much more
> advanced
> than that show above!
>
> I would really, really appritiate any advice from one of you guru's
> out
> there!
>
> Thanks!
>
>


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: paulp | last post by:
Greetings, I'm working on a CGI program that will run under MS IIS 5.0 and will browse folders on three other machines, building HTML pages that will provide links to these folders. ...
8
by: Steph | last post by:
Hi. I'm very new to MS Access and have been presented with an Access database of contacts by my employer. I am trying to redesign the main form of the database so that a button entitled...
4
by: cpptutor2000 | last post by:
Could some C guru please help me? Suppose I have a code snippet as: int* doit(){ int intArray; int *ip; ip = intArray; return ip; } Since the array intArray is allocated on the stack and so...
17
by: freemann | last post by:
Can anyone provide example code showing how to send form results to a results page, email and a comma delimited file? Notice that I need it going to all three locations. Details: I have forms...
32
by: Tom Cole | last post by:
I bet 50% of the posts I've read lately have had at least one bad thing to say about every website or book dedicated to javascript. There are clearly a few posters (you know who you are) who...
10
by: jklimek | last post by:
I'm currently a Delphi developer (my day job) but at my company we only write custom web application/database stuff, so we never really get into anything advanced. However, I know enough about...
12
by: liamo | last post by:
Don't laugh lol I know your all php guru's : ) Ok, so I have little if any knowledge with the programming language php - only having created small enquiry forms. Now I have a client that needs a...
4
by: SJ | last post by:
Can someone help me with an advanced query? I have two tables Table 1: Employees Cols: UID, lname, fname Table 2: StatEntry Cols: UID, Timestamp, description
1
by: jeddiki | last post by:
Hello, I have made a nice opt-in form and tested it in Moz FF and it looks fine. But in IE the elements don't line up properly. I think I am nearly there but can not get these elements...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.