|
What this has to do with c#?
Anyway the answers...
1. Microsoft download site
2. On status bar of what?
3. Use desktop properties
*jaans
|
|
|
|
|
1. Google.
2. Whose status bar?
3. TweakUI.
Cheers,
Vikram.
The hands that help are holier than the lips that pray.
|
|
|
|
|
Hi,
In my web application i am using a text area. How to display the & as & < as < , is there any way rather than using string.replace??
Please suggest me, if possible give me some link where i can learn.
Thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
You can try
& amp for ampersand (without the space)
AND
& lt for less than (without the space)
A quick way to look these up is to get a blank web page (aspx extension), type the symbols you want in "design" view, switch to "source" view and copy/paste the generated code for the symbol.
For example I put the characters onto a webpage and switched to source and got:
<form id="form1" runat="server">
<div>
&<br />
<</div>
</form>
Hope this helps
Chris
p.s. next time, this might be better in the Asp.Net forum rather then the C# forum
[Edit: My careful formatting doesnt seem to have copied very nicely so modified the post!]
|
|
|
|
|
Thank you very much for spending your valuable time and helping me. But i am expecting a better solution
Know is Drop, Unknown is Ocean
|
|
|
|
|
You can always use HttpUtility.HtmlDecode to convert your HTML text back into normal text, however you really need to think about whether this is what you want to do. The whole point of HTML encoded text is to have something that will display in a web browser, so < is not the same as < - until the point you convert it using HtmlDecode.
|
|
|
|
|
Thank you very much for spending your valuable time and helping me.
Know is Drop, Unknown is Ocean
|
|
|
|
|
Dear all,
I'm trying to bind two ports to one IP address. In my first method I bind a port ( 31010 ) to IpAddress.Any
Int32 port = 31010;<br />
IPAddress localAddr = IPAddress.Any;<br />
server = new TcpListener(localAddr, port);<br />
server.ExclusiveAddressUse = false;<br />
server.Start();<br />
<br />
Byte[] bytes = new Byte[256];<br />
String data = null;<br />
<br />
while (true)<br />
{<br />
client = server.AcceptTcpClient();<br />
client.ExclusiveAddressUse = false;<br />
<br />
}</snip>
This works fine in itself. The application is listening on this port and receives data which is processed happily.
However, I add another method to bind another port ( 31009 ) which I call after the first one :
private static void SendMessageToMessenger(string data)<br />
{<br />
mm_socClient = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);<br />
<br />
IPAddress ip = IPAddress.Any;<br />
mm_socClient.ExclusiveAddressUse = false;<br />
int iPortNo = 31009;<br />
IPEndPoint ipEnd = new IPEndPoint(ip.Address, iPortNo);<br />
mm_socClient.Connect(ipEnd);<br />
<br />
Object objData = data;<br />
byte[] byData = System.Text.Encoding.ASCII.GetBytes(objData.ToString());<br />
mm_socClient.Send(byData);<br />
<br />
<br />
mm_socClient.Disconnect(true);<br />
}
And then it goes wrong. It throws an Exception saying :
SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
I know that the first method is performing a blocking call to receive data, but I'm assuming this blocking call is done for the port and not the IP address but I could be wrong there. Anyhow, it won't allow me to bind a different port to the same IP address, although I set the ExclusiveAddressUse to false .
Can anyone help me out here ?
Cheers,
|
|
|
|
|
I would try "netstat -a -o -n | more" before you start your application and check that the 31009 port isn't already open.
|
|
|
|
|
Hi
I need a NumericUpDown control in the ToolStrip. Anyone can help me out how to do this ?
Thx
|
|
|
|
|
Hi,
In order to add components to ToolStrip you need to embed the control in a ToolStripControlHost component and add that to the ToolStrip. You can either create a ToolStripControlHost instance then embed the control and then add the host to the ToolStrip, or you can derive your own class from ToolStripControlHost that creates its own NumericUpDown control. You'd go the first option if this is a one-off and the second if it's likely to be used again.
Hope this helps .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
Thanks a lot, the ToolStripControlHost did it. However I only get it to work when I manually edit the Control.Designer.cs and its not showing in the IDE, anything I have to add here ?
This is what I have :
<br />
public class ToolStripNumericUpDown : ToolStripControlHost {<br />
public ToolStripNumericUpDown() : base(new NumericUpDown()) {<br />
}<br />
<br />
public NumericUpDown NumericUpDownControl {<br />
get {<br />
return Control as NumericUpDown;<br />
}<br />
}<br />
<br />
<br />
<br />
public decimal Value {<br />
get {<br />
return NumericUpDownControl.Value;<br />
}<br />
set {<br />
value = NumericUpDownControl.Value;<br />
}<br />
}<br />
<br />
protected override void OnSubscribeControlEvents(Control c) {<br />
base.OnSubscribeControlEvents(c);<br />
<br />
NumericUpDown mumControl = (NumericUpDown)c;<br />
<br />
mumControl.ValueChanged += new EventHandler ( OnValueChanged );<br />
}<br />
<br />
protected override void OnUnsubscribeControlEvents(Control c) {<br />
base.OnUnsubscribeControlEvents(c);<br />
<br />
NumericUpDown mumControl = (NumericUpDown) c;<br />
<br />
mumControl.ValueChanged -= new EventHandler ( OnValueChanged );<br />
}<br />
<br />
public event EventHandler ValueChanged;<br />
<br />
private void OnValueChanged(object sender, EventArgs e) {<br />
if (ValueChanged != null) {<br />
ValueChanged(this, e);<br />
}<br />
}<br />
}<br />
thx agian
|
|
|
|
|
Add:
[ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ToolStrip)]
to show it in IDE
|
|
|
|
|
Is there any way i can run a code snippet inside a different appdomain? (So i can load the same assembly twice for some reason)
public class MyFooBarAssembly
{
public myFooBarAssembly(string loadFrom)
{
assembly = AssemblyName.GetAssemblyName(loadFrom);
}
AssemblyName assembly;
public AssemblyName[] GetReferencedAssemblies()
{
return Assembly.ReflectionOnlyLoadFrom(assembly.CodeBase).GetReferencedAssemblies();
}
}
betonglasermur.FeedDwarf(pur_is, 17);
ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);
Morgonen är tröttmans mecka
|
|
|
|
|
First create the new domain:
AppDomain myNewAppDomain = AppDomain.CreateDomain("MyNewAppDomain");
Then create the class you want to run code on in the new app domain.
Object myObjectInADifferentDomain = myNewAppDomain.CreateInstanceAndUnwrap(myAssemblyName, myTypeName);
Then just call the methods on it as you would normally with reflection.
Simon
|
|
|
|
|
Oh, sorry, I didn't read your question properly. You can use
newAppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate);
and just pass in a CrossAppDomainDelegate for the method you want to run. That will allow you to execute your method in a different domain. (You might have to change your method slightly to match the CrossAppDomainDelegate)
Simon
|
|
|
|
|
Thanks! exactly what i needed
betonglasermur.FeedDwarf(pur_is, 17);
ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);
Morgonen är tröttmans mecka
|
|
|
|
|
My pleasure
(If only everyone was polite like you)
Simon
|
|
|
|
|
Hi everybody!
I'm using DevExpress components.
You can call Print() method of Grid Control to print the current Grid with all user customizations, but, we need to add our company header to all of our reports. So, we have to add the header to grids reports, too.
I found a solution in net: Using PrintingSystem and linking grid to it. Then handling CreateReportHeaderArea event of the link and making header in this handler, but, i cannot draw our header by DrawString() or DrawImage() and etc. methods. I have created a Report Header before and i wanted to add it as a sub report to grid report.
Unfortunately, i just found an AddSubReport method in link object, but, i don't know how i can access to this adding sub report.
I would be so grateful if you help me.
Regards,
Chapooki
|
|
|
|
|
|
thanks,
I had seen that sample before, but i cannot make my header by draw string and .... i have a header which user can change it and i want to add it as a sub report to all other reports. Any way, i changed my design to make my report manually and not use DevExpress Grid Control print.
Thanks again,
Chapooki
|
|
|
|
|
Hi,
I'm new to Visual Studio 2005 Windows application.
I need to add two button controls in a single Gridview cell using C# Windows Application.
Can Anyone Tell me the solution for the above Scenario?
Thanks in advance
regards
sri
|
|
|
|
|
Check this[^]
My idea of ideal life : Eat, Sleep, Repeat
|
|
|
|
|
Is there any way to acheive other than User control?
|
|
|
|
|
1. Create a button column
2. Add padding using datagridviewcellstyle property.
3. Handle cellpainting event to create another button in the cell.
My idea of ideal life : Eat, Sleep, Repeat
|
|
|
|