Click here to Skip to main content
15,890,185 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: get primary key value Pin
Manas Bhardwaj9-Jul-09 23:30
professionalManas Bhardwaj9-Jul-09 23:30 
AnswerRe: get primary key value Pin
himanshu25619-Jul-09 23:35
himanshu25619-Jul-09 23:35 
Questionhow we read the device which is connected to our system's serial port ? Pin
avika9-Jul-09 22:19
avika9-Jul-09 22:19 
AnswerRe: how we read the device which is connected to our system's serial port ? Pin
Manas Bhardwaj9-Jul-09 22:43
professionalManas Bhardwaj9-Jul-09 22:43 
GeneralRe: how we read the device which is connected to our system's serial port ? Pin
avika9-Jul-09 22:48
avika9-Jul-09 22:48 
GeneralRe: how we read the device which is connected to our system's serial port ? Pin
Manas Bhardwaj9-Jul-09 22:57
professionalManas Bhardwaj9-Jul-09 22:57 
GeneralRe: how we read the device which is connected to our system's serial port ? Pin
DoctorMick9-Jul-09 23:45
DoctorMick9-Jul-09 23:45 
GeneralRe: how we read the device which is connected to our system's serial port ? Pin
avika10-Jul-09 0:07
avika10-Jul-09 0:07 
I am able to connect to serial port but not able to read the data from the connected device. Here is the code which i am using to read the device-

// Create the serial port with basic settings
SerialPort port = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One);


port.Handshake = System.IO.Ports.Handshake.None;
port.ReadTimeout = 5000;
port.Open();

//retrieve number of bytes in the buffer
int bytes = port.BytesToRead;
//create a byte array to hold the awaiting data
byte[] comBuffer = new byte[bytes];
//read the data and store it
port.Read(comBuffer, 0, bytes);
string str;
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
str = enc.GetString(comBuffer);
txtData.Text = str;
port.Close();

when i am running this code then I get 0 in BytesToRead and comBuffer.

I think i am doing something wrong but what it is not have any idea.
QuestionShort cut key in ASP.Net Pin
Amit Patel19859-Jul-09 22:04
Amit Patel19859-Jul-09 22:04 
AnswerRe: Short cut key in ASP.Net Pin
Manas Bhardwaj9-Jul-09 22:12
professionalManas Bhardwaj9-Jul-09 22:12 
QuestionWeb Chat Implementation Approach Pin
platso_5889-Jul-09 21:35
platso_5889-Jul-09 21:35 
AnswerRe: Web Chat Implementation Approach Pin
Manas Bhardwaj9-Jul-09 22:14
professionalManas Bhardwaj9-Jul-09 22:14 
QuestionEditable gridview Pin
kanadoss9-Jul-09 21:23
kanadoss9-Jul-09 21:23 
AnswerRe: Editable gridview Pin
K03069-Jul-09 21:28
K03069-Jul-09 21:28 
QuestionBest CMS for .net applications Pin
riya319-Jul-09 21:17
riya319-Jul-09 21:17 
AnswerRe: Best CMS for .net applications Pin
K03069-Jul-09 21:26
K03069-Jul-09 21:26 
GeneralRe: Best CMS for .net applications Pin
riya319-Jul-09 21:35
riya319-Jul-09 21:35 
GeneralRe: Best CMS for .net applications Pin
K03069-Jul-09 21:40
K03069-Jul-09 21:40 
GeneralRe: Best CMS for .net applications Pin
riya319-Jul-09 21:40
riya319-Jul-09 21:40 
AnswerRe: Best CMS for .net applications Pin
Enver Maroshi9-Jul-09 22:02
Enver Maroshi9-Jul-09 22:02 
AnswerRe: Best CMS for .net applications Pin
Vasudevan Deepak Kumar10-Jul-09 2:37
Vasudevan Deepak Kumar10-Jul-09 2:37 
Questioncustom paging 'next/previous with numeric' Pin
pupilstuff9-Jul-09 21:16
pupilstuff9-Jul-09 21:16 
AnswerRe: custom paging 'next/previous with numeric' Pin
Sabari MD12-Jul-09 19:53
Sabari MD12-Jul-09 19:53 
GeneralRe: custom paging 'next/previous with numeric' Pin
pupilstuff12-Jul-09 21:20
pupilstuff12-Jul-09 21:20 
Questionchange column value on linkbutton Pin
vikas shukla9-Jul-09 21:11
vikas shukla9-Jul-09 21:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.