How to take multiple Input Depends On User Selection ?

KevinCalifornia

New member
Joined
Apr 1, 2010
Messages
3
Programming Experience
Beginner
Hello VB Experts,
I'm writing my first VB project : A HelpDesk application to Login Users'
Work-orders. As I'm progressing further into my project, the users have
thrown at me tougher challenge : the IT technicians wanted to be able to
create more than 1 work-orders from the same end-user.

At this moment, I have 2 divisions on my HTML page <div id="divUserInfo">
and <div id="divEachOrder">. On the first division (divUserInfo) there is
a DropDownList so the technician can search for the User-ID of the caller.
Names, location & phone of the caller will be listed accordingly. If the
caller wanted to report more than 1 problem, there is field "Number of
work-orders" where the technician can select 1 to 5. So my second
divison (divEachOrder) will be display depending on the "Number of
work-orders" so the technician wll be able to enter the details of each
work-order (Problem Type, Priority, Assign to, Estimated Completion Date,
Description, Status ...)

Which control should I use for my second division ((divEachOrder)
: GridView, DataList, FormView, DetailsView, or Repeater ? I want to be
able to this division repeatly so the technician can enter the data
seperately for each work-order.

I hope I described my need clearly enough for you to understand. If not I
will email you privately with sreenshots of my design-layout and HTML page
for better clarification.

Thank you so much.
Kevin (VB Visual Studio 5)

BTW, I tried to use the "Repeater" as shown in the codes below but when I executed it, it spitted out errors in most fields like "RadioButtonOpen is not declared", "LblCloseReason is not declared", TxtBoxCallBackNo is not declared" ...
 
Oops I forgot to show the "Repeater" codes in the last email, here it is:


<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="HelpDeskTech.aspx.vb" Inherits="HelpDeskWorkOrder.HelpDeskTech" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<tr align="center">
<td style="height: 20px; width: 120px;">
<asp:Image ID="Image1" runat="server" ImageUrl="~/HDicon.jpg" Height="80px" Width="100px" /></td>
<td align="center" style="width:60%; height: 20px"><asp:Label ID="Labe2" runat="server" BackColor="SlateBlue" BorderColor="Gainsboro"
BorderStyle="Solid" Height="20px" borderwidth="3px" Text="ITS -- Help Desk Work Order Entry" Font-Bold="True" Font-Names="Cambria" Font-Size="Large" ForeColor="White"></asp:Label>
<br />
</td>
</tr>
</table>
</div>

<div id="divUserInfo" runat="server" visible="true">
<table>
<tr>
<td align="right" style="width: 80px"><asp:Label ID="Label4" runat="server" BackColor="White" Text="Last Name " Font-Names="Berlin Sans FB"></asp:Label></td>
<td align="left"><asp:DropDownList ID="DDLLastName" runat="server" BackColor="LightCyan" Width="250px"></asp:DropDownList><br /></td>
<td align="right"><asp:Label ID="Label5" runat="server" BackColor="White" Text="User-ID " Font-Names="Berlin Sans FB" Width="80px"></asp:Label></td>
<td align="left" style="width: 1px"><asp:TextBox ID="TxtBoxUserID" runat="server" BackColor="#E0E0E0" ReadOnly="True" Width="60px"></asp:TextBox></td>
<td align="left" style="width: 109px"><asp:Button ID="ButtonListWorkOrders" runat="server" BackColor="#FFE0C0" Text="Work Orders ?" Font-Names="Baskerville Old Face" ForeColor="Maroon" />
</td>
</tr></table>
<table>
<tr>
<td align="right" style="height: 29px"><asp:Label ID="Label6" runat="server" BackColor="White" Text="Building " Font-Names="Berlin Sans FB" Width="80px"></asp:Label></td>
<td align="left" style="width: 1px; height: 29px;"><asp:TextBox ID="TxtBoxBuilding" runat="server" BackColor="LightCyan" Width="80px" ></asp:TextBox></td>
<td align="right" style="width: 60px; height: 29px;"><asp:Label ID="Label7" runat="server" BackColor="White" Text="Room " Font-Names="Berlin Sans FB"></asp:Label></td>
<td align="left" style="width: 10px; height: 29px;"><asp:TextBox ID="TxtBoxRoom" runat="server" BackColor="LightCyan" Width="60px" ></asp:TextBox></td>
<td align="right" style="width: 70px; height: 29px;"><asp:Label ID="Label8" runat="server" BackColor="White" Text="Phone#" Font-Names="Berlin Sans FB" Width="80px"></asp:Label></td>
<td align="left" style="width: 23px; height: 29px;"><asp:TextBox ID="TxtBoxPhone" runat="server" BackColor="#E0E0E0" ReadOnly="True" Width="120px" ></asp:TextBox></td>
</tr>
</table>
<table>
<tr>
<td align="right" style="height: 29px"><asp:Label ID="Label2" runat="server" Font-Names="Berlin Sans FB" Height="27px" Text=" Number of Work Orders"
Width="178px"></asp:Label></td>
<td><asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" BackColor="LightCyan"
Height="20px" Width="39px">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
<asp:ListItem>5</asp:ListItem>
</asp:DropDownList></td>
</tr>
</table>
</div>
<div id="divEachOrder" runat="server" visible="true">
<asp:Repeater id="ProblemRepeater" runat="server">
<HeaderTemplate>
<table>
<tr>
<td align="center" style="height: 35px; width: 484px;"><asp:Label ID="Label9" runat="server" BackColor="SlateBlue" BorderColor="WhiteSmoke"
BorderStyle="None" EnableTheming="False" EnableViewState="False" Font-Underline="False"
Text="P r o b l e m -- D e s c r i p t i o n" Width="576px" Font-Bold="True" Font-Names="Calisto MT" ForeColor="White" ></asp:Label>
</td>
</tr>
</table>
<table>
<tr>
<td align="left">
<asp:Label ID="Label10" runat="server" BackColor="White" Text="Problem Type" Width="114px" Font-Names="Berlin Sans FB"></asp:Label>
<asp:DropDownList ID="DDLProblemType" runat="server" BackColor="#E0E0E0" Width="190px" DataSourceID="SqlDataSource2" DataTextField="Request_Type" DataValueField="CallTag" AutoPostBack="True" enableviewstate="True" AppendDataBoundItems="True">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationConnectionString1 %>"
SelectCommand="SELECT Request_Type, Call_Back_No_Prompt + '' + Tag_no_prompt + Request_Type 'CallTag' FROM HD_Request_Type WHERE (Campus_Location = 'ecc')">
</asp:SqlDataSource></td>
<td align="left">
<asp:Label ID="LblCallBckNo" runat="server" BackColor="White" Text="CallBack#" Width="70px" Visible="False" Font-Names="Berlin Sans FB"></asp:Label></td>
<td>
<asp:TextBox ID="TxtBoxCallBckNo" runat="server" BackColor="LightCyan" Width="120px" AutoPostBack="True" Visible="False"></asp:TextBox></td>
</tr>
</table>
<asp:TextBox ID="TxtBox3" runat="server"></asp:TextBox>
<table>
<tr>
<td><asp:Label ID="Label12" runat="server" BackColor="White" Text="Assign To" Width="114px" Font-Names="Berlin Sans FB"></asp:Label>
<asp:DropDownList ID="DDLAssignTo" runat="server" BackColor="#E0E0E0" Width="162px" AutoPostBack="True" DataSourceID="SqlDataSource4" DataTextField="Userid" DataValueField="Userid">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationConnectionString1 %>"
SelectCommand="SELECT * FROM [HD_Tech_Staff]"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationConnectionString1 %>"
SelectCommand="SELECT [Priority_code], [Priority_Desc] FROM [HD_Priority] ORDER BY [Priority_code] DESC"></asp:SqlDataSource>
</td>
<td align="right" style="width: 280px"><asp:Label ID="LblTagNo" runat="server" BackColor="White" Text="TAG No" Width="70px" Visible="False" Font-Names="Berlin Sans FB"></asp:Label>
<asp:TextBox ID="TxtBoxTagNo" runat="server" BackColor="#E0E0E0" Width="136px" Visible="False"></asp:TextBox></td>
</tr>
</table>
<table>
<tr>
<td ><asp:Label ID="Label1" runat="server" BackColor="White" Text="Computer Name" Width="118px" Font-Names="Berlin Sans FB"></asp:Label>
<asp:TextBox ID="TextBox2" runat="server" BackColor="#E0E0E0" ReadOnly="True"></asp:TextBox>
</td>
<td align="right" style="width: 280px">
<asp:Button ID="BtnListTagNo" runat="server" BackColor="#FFE0C0" Text="Work Orders by Tag no" Width="170px" Visible="False" Font-Names="Baskerville Old Face" ForeColor="Maroon" />
</td></tr>
</table>
<asp:Label ID="Label15" runat="server" BackColor="White" Text="Priority" Width="72px" Font-Names="Berlin Sans FB"></asp:Label>
           <asp:DropDownList ID="DDLPriority" runat="server" BackColor="Yellow" Width="136px" AutoPostBack="True" DataSourceID="SqlDataSource3" DataTextField="Priority_Desc" DataValueField="Priority_Code" DataMember="DefaultView">
</asp:DropDownList>
  
<asp:Label ID="Label16" runat="server" BackColor="White" Text="Estimated Completion Date" Width="190px" Font-Names="Berlin Sans FB"></asp:Label>
<asp:TextBox ID="TxtBoxFinishDate" runat="server" BackColor="LightCyan" Width="112px"></asp:TextBox><br />
<asp:Label ID="Label17" runat="server" BackColor="PaleGoldenrod" Font-Underline="False"
Text="Description" Width="110px" BorderColor="MistyRose" BorderStyle="Ridge" Font-Names="Berlin Sans FB"></asp:Label>
  <asp:TextBox ID="TxtBoxProblemDesc" runat="server" BackColor="LightCyan"
Height="31px" Width="456px" AutoPostBack="True" Columns="1" TextMode="MultiLine"></asp:TextBox><br />
<asp:Label ID="Label18" runat="server" BackColor="PaleGoldenrod" Font-Underline="False"
Text="Work History" Width="114px" BorderColor="MistyRose" BorderStyle="Ridge" Font-Names="Berlin Sans FB"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" BackColor="LightCyan" Height="36px" Width="456px" AutoPostBack="True" TextMode="MultiLine"></asp:TextBox><br />
<table>
<tr>
<td align="left">
<asp:Label ID="Label19" runat="server" BackColor="White" Text="Status" Width="45px" Font-Names="Berlin Sans FB"></asp:Label></td>
<td style="width: 140px; height: 52px;">
<asp:RadioButtonList ID="RadioButtonOpen" runat="server" BackColor="#E0E0E0" RepeatDirection="Horizontal" AutoPostBack="True">
<asp:ListItem Selected="True">Open</asp:ListItem>
<asp:ListItem>Close</asp:ListItem>
</asp:RadioButtonList>
</td>
<td id="closeReasonColumn" runat="server" visible="false" enableviewstate="true" style="height: 52px; width: 378px;">
<asp:Label ID="LblCloseReason" runat="server" BackColor="White" Text="Close Reason" Width="112px" Font-Names="Berlin Sans FB"></asp:Label>
<asp:DropDownList ID="DDLCloseReason" runat="server" BackColor="#E0E0E0" Width="176px" AutoPostBack="True" DataSourceID="SqlDataSource1" DataTextField="Description" DataValueField="Tag_Info_Needed">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationConnectionString1 %>"
SelectCommand="SELECT Close_Reason, Description, Tag_Info_Needed FROM HD_Close_Reason"></asp:SqlDataSource>
</td>
</tr>
<tr>
<td align="left" style="height: 15px;"></td>
<td></td>
<td id="computerTagColumn" runat="server" visible="false" enableviewstate="true" style="height: 15px; width: 378px;">
<asp:Label ID="LblComputerTag" runat="server" BackColor="White" Text="New Computer Tag#" Width="168px" Font-Names="Berlin Sans FB"></asp:Label>
<asp:TextBox ID="TxtBoxNewTagNo" runat="server" BackColor="LightCyan" Visible="True" AutoPostBack="True"></asp:TextBox></td>
</tr>
</table>
<table width="100%" cellpadding="10px">
<tr>
<td align="right" style="width:40%">
<asp:Button ID="ButtonSubmit" runat="server" BackColor="#FFE0C0" Text="Submit" OnClick="ButtonSubmit_Click" ForeColor="Blue" />
</td>
<td align="left" style="width:60%">
<asp:Button ID="ButtonExit" runat="server" BackColor="#FFE0C0" Text="Exit" ForeColor="Blue" />
</td>
</tr>
</table>
</HeaderTemplate>
</asp:Repeater>
</div>
  
</form>
</body>
</html>
 
hi, please use code tags for easier reading

thanks
 
alander, thanks for your reply. I don't know how to code tag it yet.
(I'm a newbie). BTW, I would like to post a screenshot of my project for everyone to see what I'm working on. I'm just learned how to do it from the forum ... so here it is ... my first try :

Upload Screenshot
 
He means use code tags on the forum!

Put CODE in square brackets at the beginning of your code and put /CODE in square brackets at the end of your code. We can hardly read any of what you put in there because it's too garbled.
 
Back
Top