C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » JavaScript »

Urgent HelpHow to add item in dropdown list When i click the add Button


Posted Date: 07 Jul 2008      Posted By: Anand      Member Level: Bronze     Points: 1   Responses: 1



I have a form. I want to add items in the dropdown list.When i click the 'ADD' Button, it should open a new window and then i can add a new item in the textbox and it should be added in the actual form. Any help will be Appreciated.




<html>
<head>
<title>Add New Servers In ISRServerlist</title>

</head>


<form name=Check method="post" action="ASP Page2.asp">

<h3> Server Details </h3>
<table border=1 style="WIDTH: 697px; HEIGHT: 64px">

<tr bgcolor=#738ead><td><font color=white size=2><b>ServerName:<input name="Servername"></B></font></td>

<td bgcolor=#738ead><font color=white size=2><b>Region:<select name="Region">
<option selected></option>
<option value="Factory">APAC</option>
<option value="NonFactory">PACRIM</option>
<option value="Factory">US</option>
<option value="NonFactory">CANLA</option>
</select>
</b></font><input type ="button" name="AddItem" value="ADDITEM" onclick="return ADD();"></td>

<td bgcolor=#738ead><font color=white size=2><b>Country:<select name="Country" title="Select the Country">
<option selected></option>
<option value="Factory">INDIA</option>
<option value="NonFactory">US</option>
<option value="Factory">UK</option>
<option value="NonFactory">CANADA</option>
</select>
</b></font><input type ="button" name="AddItem" value="ADDITEM" onclick="return ADD();"></td>


<td bgcolor=#738ead><font color=white size=2><b>SiteName:<input name="Sitename">
</b></font></td></tr>

<tr><td><input type="submit" value="SAVE" id="submit1" name="submit1"></td> </tr>
</table>
</form>

</body>
</html>







Responses

Author: vipul    07 Jul 2008Member Level: DiamondRating: 2 out of 52 out of 5     Points: 4

hi,
for taht you store your value in session then close child page and return to the parent page and in the parent page you can see that this session have value or not. if session have value then add this item to your drop down this way.

ddl.Items.Insert("Where to insert inot drop down",new ListItem("Your drop down valur get from session","you value for that item");

Please Rate This Answer If They Helpful

Thanks & Regards
Patel Vipul



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Finding value of GridView on clientside.
Previous : Java Script Log File
Return to Discussion Forum
Post New Message
Category: JavaScript

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use