|
it send data to tcp/ip port number, ex 8080, now i want to write socket program to read data from that port. Any body help me? How can i do that?
Thanks,
|
|
|
|
|
Create a new socket, bind it to 8080 port and use the Accept or BeginAccept methods (synchronous or asynchronous). When you have accepted a socket use the Receive or BeginReceive methods to read from that socket.
I will use Google before asking dumb questions
|
|
|
|
|
|
Why do everyone want to have their problems resolved by others with no sweat at all? Search the web and MSDN. I gave you enough hints. MSDN also has a few examples
I will use Google before asking dumb questions
|
|
|
|
|
Andrei - a 5 from me for the answer you originally gave.
|
|
|
|
|
Thanks.
I will use Google before asking dumb questions
|
|
|
|
|
He's sent you enough information for you to go and do some research on your own on google. That's the way this site works, it's not rentacoder where people give you code in exchange for money.
|
|
|
|
|
is there any way to read and write from the same file simultaneously?
waiting for a favorable reply
|
|
|
|
|
|
I need to get selected item value on the next page as i select the item and click send button it should send that selected value on next page.
|
|
|
|
|
Hi,
U can use session variable for that. Just add selected value in session and get it from next page.
Thanks,
Sun Rays
Rate this post if you like answer.
My Articles
|
|
|
|
|
Hi All,
I have a horizontal Splitter, for which I would like the top panel to remain 20 pixels in height. I do this because I have a containter on it, and I overide the OnPaint method. It is being painted as a band similar to that of Disk Defragmentor.
Any ideas on how to disable a Splitter panel from being resized? I've locked the controls (it stops me from resizing it at design time); I've set SplitterFixedPanel = Panel1 [1,5]; and I've set SplitterDistance to the same as design time [2]. Overriding Moving events causes a runtime error when I try to force the control's height back to the desired height through the Height property [3, 4]. From [5]:Use the Panel1 property to configure the left panel of a vertical SplitContainer or the top panel of a horizontal SplitContainer. For example, you can specify the minimum size of the panel by changing the value of the Panel1MinSize property, set the FixedPanel property to Panel1 so that the panel remains the same size when the container is resized, or you can get or set the panel's BackgroundImage and BackgroundImageLayout properties. Nothing stops this damn thing from moving. Any help would be appreciated.
Thanks,
Jeff
[1] SplitContainer.FixedPanel Property[^]
[2] SplitContainer.SplitterDistance Property[^]
[3] SplitContainer.SplitterMoving Event[^]
[4] SplitContainer.SplitterMoved Event[^]
[5] SplitContainer.Panel1 Property[^]
|
|
|
|
|
how to retrieve value from port
our task is
take two textboxes one is ip and port
and one button name retrieve
u click the retrieve button u get the values in port
plz send me code in c#.net windows application
|
|
|
|
|
sivaramireddy p wrote: the values in port
I don't understand what you meant by "the values in port".. what value? Like what?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
hi
how to get the files name of a folder, and also of subfolders.
plz help me
rajeev kumar sharma
vri software pvt. ltd.
new delhi India
|
|
|
|
|
http://www.developerfusion.co.uk/show/4359/
Hope it helps.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Any problem with this link?? Why 1 vote?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hi Guys. I am writing a piece of code to extract data from an Access DB into a CSV file. Now, i want to inlcude int he below piece of code only records that are set to a certain value in a column. I.e. I want to extract only the records in the "EXPORTED" Column that have a value of 0. How do I do this in the below code? I think I masy have to add this in the foreach line but I am not sure how to do this. Can somebody please help me with this? I.e. I want to say,
foreach (DataRow dr in dt.Rows WHERE ["Exported"] == 0).
I am sure this is incorrect. How do I structure this correctly?
foreach (DataRow dr in dt.Rows)
{
for (int i = 0; i < iColCount; i++)
{
if (!Convert.IsDBNull(dr[i]))
{
sw.Write(dr[i].ToString());
}
if (i < iColCount - 1)
{
sw.Write(",");
}
}
sw.Write(sw.NewLine);
}
sw.Close();
"Live for today and let Tomorrow take care of itself"
|
|
|
|
|
Try this..
foreach (DataRow dr in dt.Rows)<br />
{ <br />
if(dr["EXPORTED"]==0)<br />
{ <br />
for (int i = 0; i < iColCount; i++) <br />
{ <br />
if (!Convert.IsDBNull(dr[i]))<br />
{ <br />
sw.Write(dr[i].ToString()); <br />
}<br />
if (i < iColCount - 1) <br />
{ <br />
sw.Write(","); <br />
} <br />
} <br />
sw.Write(sw.NewLine); <br />
} <br />
} <br />
sw.Close();
|
|
|
|
|
Thanks mate. I tried this.
Prateek G wrote: if(dr["EXPORTED"]==0)
It comes up with an error:"Operator '==' cannot be applied to operands of type 'object' ant 'int'
|
|
|
|
|
how to retrieve value from port (localport)
|
|
|
|
|
Hi,
I am developing an editor in C#.net. I've a rich text editor. What i need to do is that opening a file in rtf format. When i convert word document to rtf it extract the text but without proper formating. Will you please let me know anything that can help me to convert doc to rtf in same formating. It would be very nice of you.
|
|
|
|
|
Hi ,
My aim is to clear all the textboxes in my form . the code which i have given is working fine with the form but its not working properly with the tabcontrol textboxes if any one has any idea abt this then please do let me know
regards
sindhu tiwari
CODE ::::::
foreach(Control c in this.Controls)
if(c is TextBox)
( c as TextBox).Clear();
its me sid
|
|
|
|
|
sindhutiwari wrote: foreach(Control c in this.Controls)
if(c is TextBox)
( c as TextBox).Clear();
Hi,
here in this loop you have to check for tab control abd then you have to again loop for controls in tab control. like this
foreach(Control c in this.Controls)<br />
if(c is TextBox)<br />
( c as TextBox).Clear(); <br />
if(c is TabControl)<br />
{<br />
foreach(Control c1 in this.Controls)<br />
if(c1 is TextBox)<br />
( c1 as TextBox).Clear(); <br />
<br />
}<br />
Thanks,
Sun Rays
Rate this post if you like answer.
My Articles
|
|
|
|
|
thanks allot sir
its me sid
|
|
|
|