View Single Post
  #1 (permalink)  
Old May 18th, 2004, 01:18 PM
bamboat_3 bamboat_3 is offline
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default store multiple values in a string

Hi Friends,

I am new user of ASP.NET. I'm trying to store the multiple values in
a string, but very time it override the pervious value whenever I
call the function through a command button.

Please help me out.

Here I also enclosing the sample coding for your reference

<%@Page Language=VB Debug=True %>
<Script runat="server">

Dim WorkExperience as String


Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)


lblMessage.Text = "Press a button !"

WorkExperience +=" Hello !"

End Sub



Sub SubmitBtn_AddValue(Sender as Object, E as EventArgs)



WorkExperience + = "IT Officer"
WorkExperience + = "01,"
WorkExperience + = "2002,"
WorkExperience + = "02,"
WorkExperience + = "2002,"
WorkExperience + = "Hello2,"
WorkExperience + = "+"


lblMessage.Text= WorkExperience

End Sub

</Script>

<html>
<body>
<form runat="server">
<asp:Label
id="lblMessage"
Text=""
runat="server"
/>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<asp:Button
id="butAlone"
text="Add Value"
OnClick="SubmitBtn_AddValue"
runat="server"
/>

<BR>
<BR>
</form>
</body>
</html>

Try to run the above cited code. You will find a button named
as "Add Value", if u press this button it will display a dummy
value, now I want that if you press this Add Value more than once
time then it must display the dummy value respectively.

For Example: Press this button 3 times then it must show the same
value 3 times.

Please reply me soon because all my work is halt due to this problem

Looking forward to your reply...

Regards,
Mustafa Bamboat
bamboat_3@hotmail.com

Reply With Quote