 |
| ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

July 29th, 2004, 02:54 AM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hash Tables
Hi,
With the below code
<%@ page Language= "c#" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<table style="background-color:#cc0033" width="100%" cellpadding="10" cellspacing="0">
<tr>
<td width="10%"">
<img src="logo.gif" align="left" />
</td>
<td width="60%">
<asp:label id="WelcomeMessage" runat="Server">Welcome to the Stationary Inventory Control System!</asp:label>
</td>
<td width="30%">
Select your Language:<br>
<form runat="server" ID="Form1">
<asp:DropDownList id="LanguageList" name="Control" runat="Server" OnSelectedIndexChanged="DropList_Changed" AutoPostBack="True" />
</form>
<br />
</td>
</tr>
</table>
<script runat="server">
Hashtable Languages = new Hashtable();
public void Page_Load()
{
Languages.Add("English", "Welcome to the Stationary Inventory Control System!");
Languages.Add("French", "Accueillir au Système à l'arrêt de Contrôle d'Inventaire!");
Languages.Add("Spanish", "¡Bienvenido al Sistema Inmóvil del Control de existencias!");
Languages.Add("German", "HeiÃen Sie Willkommen zum Feststehenden Lagerhaltungssystem!");
if (!Page.IsPostBack)
{
LanguageList.DataSource = Languages.Keys;
Page.DataBind();
}
}
public void DropList_Changed(object sender, EventArgs e)
{
WelcomeMessage.Text = (String) Languages[LanguageList.SelectedItem.Text];
}
</script>
How do i add hash tables to the codes??
Ong LeeHiang
|
|

July 29th, 2004, 03:03 AM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I mean drop down lists like the one in this website showing the pages of the forum
|
|

July 29th, 2004, 07:54 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
I'm not sure what you are asking... I see a dropdown list in your code.
|
|

July 29th, 2004, 09:39 PM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I mean how do i add another dropdownlist continuing where the script ends.
|
|

July 30th, 2004, 09:37 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
I'm still not sure what you mean. Can you explain it in more detail?
I see a dropdownlist, and you are populating it in the server code.
Are you asking how you add items to the dropdownlist?
|
|

July 31st, 2004, 01:42 AM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi,
I am designing an stationary inventory control system and i plan to design my interface such that there a table which shows one side the stationary item and the other a dropdownlist that the uses can choose the quantity of item issued.
Can u help me??
Ong Lee Hiang
|
|

August 3rd, 2004, 04:36 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Where is the list of items coming from? I don't see how what you explained is related to the original post code. It sounds like you need to set up a data query to get the items (if they are in a database), then set up some data listing control (repeater, datalist, datagrid) in which you can place your "quantity" drop down list.
|
|

August 4th, 2004, 05:03 AM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I am now designing an user interface and the above codes are for the interface. I seems to have a problem using asp:dropdownlist. It gives me a compilation error.
LeeHiang
|
|

August 4th, 2004, 08:08 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
And that error is?
|
|

August 9th, 2004, 08:24 PM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
It says the aspdropdownlist is not in the form
|
|
 |