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 » ASP.NET »

How to write client side script???????


Posted Date: 04 Jul 2009      Posted By: Girish Chaudhari      Member Level: Silver     Points: 1   Responses: 2



Hello All,

I have a task that in wizard step their are 2 list boxes also 2 button << & >> in between that. I want to show the first list box will be filled first at time of page load by the carrier names in carrier master table. When we will select the list items of carriers in first list box & then click on >> button then it displays selected carriers in second list box & selected removes the from first list box & Vice versa also.

have I need to take a arraylist or something for handle the list items in first list box????????

And how we write the client side script for that??????

Please reply me......

Thanks & Regards,
Girish





Responses

Author: Prem    04 Jul 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

hi,
use this codes..

Protected Sub AddButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddButton.Click
Dim count As Integer
Dim i As Integer = 0
Dim li As ListItem
Try
For count = 0 To Me.FirstListBox.Items.Count - 1
If FirstListBox.Items(count - i).Selected Then
li = FirstListBox.Items(count - i)
Me.SecondListBox.Items.Add(li)
Me.FirstListBox.Items.RemoveAt(count - i)
i = i + 1
End If
Next
Catch ex As Exception
Response.Write(ex.Message + "<br />" + ex.StackTrace)
End Try
End Sub



Author: Devendra    04 Jul 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

Dear
To write java script you have to write following codes on page load event

Button1.Attributes.Add("OnClick","Function Name");

Write Javascript Function And Make your code inside that.

Thanks
dkmisra



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 : Button click event how to call datalist findcontrol any examples
Previous : sample examples for the asp.net appications in c#
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use