|
Thanks OriginalGriff.
I changed my Text property to
public override string Text
{
get { return base.Text; }
set
{
base.Text = value;
this.Invalidate();
}
}
and all is well.The FoZ
|
|
|
|
|
Hey,
I have my data in a grid (no datagridview), export a grid (30 cols and over 20.000 rows) takes a lot of time (minimum 2minutes)...
now my question: Is there a way to accelerate this?
for (int i = 0; i < UsingGrid.Cols; i++)
{
for (int j = 0; j < UsingGrid.Rows; j++)
{
worksheet.Cells[j + 1, i + 1] = ConvertToExcelFormat(Convert.ToString(UsingGrid[j, i]));
}
}
Thank you
|
|
|
|
|
|
Why can't you use Response.write with Inline or attachment file type to export data from Grid to Excel. Rashmi.M.K
|
|
|
|
|
|
Hi
I have string say "Deepak"
how do i convert this into a byte array of 44,65,65,70,61,6b. I converted the ascii to
hex-string "44656570616b" using
String.Format("{0:x2}", (uint)System.Convert.ToUInt32(tmp.ToString()));
thanks
|
|
|
|
|
Turning a string into its ASCII bytes, if possible, is done using Encoding.ASCII.GetBytes(string)
BTW: The code you have shown converts a number to a string, which in .NET is always using Unicode, not ASCII.
|
|
|
|
|
it returns "68, 101, 101, 112, 97, 107.
i need to get 44,65,65,70,61,6b
|
|
|
|
|
GetBytes() returns bytes, which means numbers. You can turn those into strings again using whatever convention you choose. "Deepak" starts with a "D" which is 68 when counting in decimal, 44 in hex, 102 in octal, etc. If you want hex, you probably need to apply ToString("X2") to each of those bytes.
|
|
|
|
|
hi all,
I have made simple windows based application to illustrate the event fire when we click on the stop debugging button in VS 2008.
Actually, When i click on the "close" button of the form in the running application . It invokes the method as mentioned in the "form_load" event
e.g.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label1.Text = "Hello"
AddHandler System.Windows.Forms.Application.ApplicationExit, AddressOf abcMethod
End Sub
Private Sub abcMethod()
End Sub
but when i directly click on the "stop" debugging in the menu option in VS 2008,it doesn't go to the breakpoint inserted at the form_load event. I want to know which event fires at click of the stop debugging button in the menu option in vs 2008.
Thank you
|
|
|
|
|
AFAIK none. Stopping an app inside the debugger is like killing it in Task Manager, no more code gets executed.
|
|
|
|
|
thanx for ur answer.
u mean no event fires on stop the debugging ????
|
|
|
|
|
If you click 'Stop Debugging' the program will close, I think immediatly, with no events fired.
If you want to have the ApplicationExit event fire, you need to close your application with the 'X' button or by some method that calls Application.Exit() .
|
|
|
|
|
Hi,
I have a webservice that send bulk SMS and it works for English language. The problem is when users send SMS using ARABIC text no SMS is receieved.
Please help me to improve or change my code so it will work for arabic characters. I think the problem is when converting the string to UTF-8 code.
MY Webservice:
http:
MY C# Code that send the message to my webservice.
string sMessage = وقت البلاغ:" ;
byte[] utfCodes = System.Text.Encoding.UTF8.GetBytes(sMessage);
//second solution
SendGSM.send_sms(utfCodes); Dabsukol
|
|
|
|
|
try this:
byte[] utfCodes = System.Text.Encoding.Default.GetBytes(sMessage);
|
|
|
|
|
byte[] utfCodes = System.Text.Encoding.Default.GetBytes(sMessage);
byte[] utfCodes = System.Text.Encoding.UTF8.GetBytes(sMessage);Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Why don't you just pass the string to web-service rather than passing byte array? Best wishes,
Navaneeth
|
|
|
|
|
Thanks for the information. I will check with our server log the real problem and at the same time try to see for other solutions. I will keep you posted. Dabsukol
|
|
|
|
|
Hi
i want to share a xml file between some companies.for this reason i uploaded this file to the internet and use it for sharing and set its permission to 777....
don't problem for reading that....
XmlTextReader reader = new XmlTextReader(carDBPath);
XmlTextWriter writer = new XmlTextWriter(url, Encoding.UTF8);
while (reader.Read())
{
writer.WriteNode(reader, true);
}
reader.Close();
writer.Close();
now, assume that i change its information and want to apply this changes to base file in the internet....
i don't want to work with FtpWebRequest or any class like this that works with ftp to upload file...
how can i do this?Sorry for bad english
|
|
|
|
|
I generally don't think it's such a great idea to let these companies share a single xml file (why not use a database instead?) but to answer your question: Try using a web service to send and receive the file.
|
|
|
|
|
|
Hi guys, I've tried to add a prompt to display a dialog box when the user pressed a button, it seems an error surfaced when I run the program. The error showed, "no overload for method "Show" takes '3' arguments." May I know what went wrong, any help would be appreciated. Thanks in advance =) Here is the code snippet below.
if (MessageBox.Show("Are you sure?","Save data", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
}
|
|
|
|
|
i think fourth argument MessageBoxIcon is missing rahul
|
|
|
|
|
Hi Rahul, thanks for replying, does it look something like this when I added the fourth argument? I've tried it, but the error still surfaced and this time it shows, "No overload for method 'Show' takes '4' arguments.
if (MessageBox.Show("Are you sure?", "Confirm save?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
}
|
|
|
|
|
Hi Rahul, I think I've done it. After adding the next argument, "MessageBoxDefaultButton", the prompt worked, thank you so much =)
|
|
|
|