Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I want to bind all serial port of the computer to dropdownlist
For this i have written code as

string[] ports = System.IO.Ports.SerialPort.GetPortNames();

       for (int i = 0; i < ports.Length; i++)
       {
           Dropdownlist1.Items.Add(ports[i]);
       }


My code will be deployed on the server ,i want to get all serial port connected to client machine not of the server .

Will the above code will work for me.
Posted

1 solution

Hi,

ASP code executed in server side only, You have to write the ActiveX, sliverlight component for this, which is runs in the clinet PC.

Go through below Google search link, you may get some help

Google[^]

Thanks
--RA
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 22-Feb-13 0:19am    
Correct, about the server-side, but... It's not correct to call ASP.NET "ASP". It is not. Using ActiveX is quite a bad idea. It's very unsafe, not supported by all browsers (which is good).
—SA
Rajesh Anuhya 22-Feb-13 0:25am    
Yes --SA, You are 100% correct, But i think there is no option for the poster, I have faced similar kind of situation long back. that time I unblock some privacy settings in the browser also, which is unsafe.
--RA
Sergey Alexandrovich Kryukov 22-Feb-13 0:31am    
At least it needed some explanation...
—SA
aassaahh 22-Feb-13 1:15am    
how to write activex code or silverliegth code ,any example or demo code in asp.net ,please help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900