Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 03, 2012 12:54 PM by Rohit Binjola
0 Points
2 Posts
May 01, 2012 06:09 PM|LINK
Hey Guys,
I dont know if this is the right place to post this but here is the problem i need help with..
There is a long string coming from the serial port every t seconds which is seperated by spaces.. eg. "1000 1000 1 500 2"..i have used AJAX for this..
I want to extract every string and display them on seperate text boxes in real time as the get fed from the serial port..
Any idea on how to do this using VB code in ASP.Net?
Thanks!
Aniq
Contributor
4394 Points
1102 Posts
May 01, 2012 07:54 PM|LINK
You can simply split the string by a space into an array
Dim arr() as string = myString.Split(" ")
May 01, 2012 08:42 PM|LINK
thank you for the response..but how can i proceed to display these strings into seperate textboxes from the array?
Star
8068 Points
1023 Posts
Microsoft
May 03, 2012 07:24 AM|LINK
Hi
You should dynmaic create textbox for your array,
Here is a example:
http://forums.asp.net/t/1152363.aspx
If you can't understand C# Use this tool:
http://www.codechanger.com/
Hope it helpful.
Member
84 Points
33 Posts
May 03, 2012 12:54 PM|LINK
Hi ,
you can write loop upto array.length-1
inside that loop you can create dynamic textboxes and assign values seperatle like::
For(int i=0;i<=array.length-1;i++)
{
Textbox newtextbox = new Textbox();
newtextbox.Text = array[i];
}
anixda1
0 Points
2 Posts
Extracting strings from a space separated line/string
May 01, 2012 06:09 PM|LINK
Hey Guys,
I dont know if this is the right place to post this but here is the problem i need help with..
There is a long string coming from the serial port every t seconds which is seperated by spaces.. eg. "1000 1000 1 500 2"..i have used AJAX for this..
I want to extract every string and display them on seperate text boxes in real time as the get fed from the serial port..
Any idea on how to do this using VB code in ASP.Net?
Thanks!
Aniq
adamturner34
Contributor
4394 Points
1102 Posts
Re: Extracting strings from a space separated line/string
May 01, 2012 07:54 PM|LINK
You can simply split the string by a space into an array
Dim arr() as string = myString.Split(" ")
anixda1
0 Points
2 Posts
Re: Extracting strings from a space separated line/string
May 01, 2012 08:42 PM|LINK
thank you for the response..but how can i proceed to display these strings into seperate textboxes from the array?
Dino He - MS...
Star
8068 Points
1023 Posts
Microsoft
Re: Extracting strings from a space separated line/string
May 03, 2012 07:24 AM|LINK
Hi
You should dynmaic create textbox for your array,
Here is a example:
http://forums.asp.net/t/1152363.aspx
If you can't understand C# Use this tool:
http://www.codechanger.com/
Hope it helpful.
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework
Rohit Binjol...
Member
84 Points
33 Posts
Re: Extracting strings from a space separated line/string
May 03, 2012 12:54 PM|LINK
Hi ,
you can write loop upto array.length-1
inside that loop you can create dynamic textboxes and assign values seperatle like::
For(int i=0;i<=array.length-1;i++)
{
Textbox newtextbox = new Textbox();
newtextbox.Text = array[i];
}