|
sure.I will definately keep into mind next time and thanks for ur advice.
|
|
|
|
|
how to change font size of the formula fields of crystal report dynamically ?????its urgent ....
|
|
|
|
|
First, the code that i´m using:
HttpWebRequest hRequest = ((HttpWebRequest)WebRequest.Create(url));
hRequest.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3";
HttpWebResponse resp = (HttpWebResponse)hRequest.GetResponse();
StreamReader reader = new StreamReader(resp.GetResponseStream());
string res = reader.ReadToEnd().ToString();
reader.Close();
textBox1.Text = res;
The problem is when i see html source into the textbox it appears bad formatted, dont know if each line of a texbox has a limit of characters and this is why it jumps to another line or what happens.
I set the wordwrap property of the textbox to false and added both scrolls bars, but it still bad formatted.
Can someone help me?
Thanks in advance.
|
|
|
|
|
Nothing is wrong with the TextBox. It's just the string you're getting get from the response is not formatted, the textbox outputs it as it is. Most, if not all, compilers and interpreters don't generate formatted response. If you're calling a static webpage, it's just the way it is.
Eslam Afifi
|
|
|
|
|
Ok, and how can i format the response because if i see the html of google.com into firefox it appears formatted, but into my textbox no.
Any idea how can i output the html source formatted into a textbox??
Thanks in advance.
|
|
|
|
|
You'll have to format it yourself. Google and see if someone wrote something you can use or code it yourself.
Do NOT use the method where you put the html in xml and output it formatted simply because html can be not well formatted xml.
Eslam Afifi
|
|
|
|
|
Mmmz... using a richtextbox instead a textbox seems that solve the problem.
Thanks for the replies.
|
|
|
|
|
You're welcome. The problem was that the TextBox uses the Environment.NewLine while the RichTextBox uses any of '\n' and '\r' too as line breaks. I didn't know that, thanks for the info.
Eslam Afifi
|
|
|
|
|
Hi
I'm Using LandScape Property Of PrintDocument by this code :
void printDocument_PrintPage(object sender, PrintPageEventArgs e)
{
e.PageSettings.Landscape = true;
}
all page is LandScape except First Page that in not LandScape !!!!
|
|
|
|
|
Could you set the PrintDocument.DefaultPageSettings.Landscape to true, before you start printing.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
|
No problem.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
hi all,
my problem is i have data like below(dates are in dd\mm\yyyy format)
start_date end_date fruits_eaten per_day_fruit_eaten
5/5/2008 14/5/2008 40 40/10 = 4
12/5/2008 21/5/2008 30 30/10 = 3
20/5/2008 30/5/208 55 55/11 = 5
i want to calculate above data like below
for the dates between 10/5/2008 and 25/5/2008 total fruits eaten are :
10/5/2008 = 4
11/5/2008 = 4
12/5/2008 = 4 + 3
13/5/2008 = 4 + 3
14/5/2008 = 4 + 3
15/5/2008 = 3
16/5/2008 = 3
17/5/2008 = 3
18/5/2008 = 3
19/5/2008 = 3
20/5/2008 = 3 + 5
21/5/2008 = 3 + 5
22/5/2008 = 5
23/5/2008 = 5
24/5/2008 = 5
25/5/2008 = 5
please help me solve this puzzle as it is driving me nuts !! i want to solve it in c# but logics are also welcomed
thanks in advance !
|
|
|
|
|
Hmmm... lets see, this can be done using a HashTable.
First make empty string entries with keys equal to the dates present in the range.
Then iterate through each date range you have, and map the corresponding entry into the HashTable seperated by a +
-------------------------------------------
It's code that drives you - Shyam
|
|
|
|
|
shyam can u give example.the problem is i haven't used hashtables !
|
|
|
|
|
Hello everyone,
In IIS, we can set the directory security of some virtual directory to .Net Passport authentication. I am very interested in this feature. But I am not sure that if I configure IIS in this way,
- Which .Net passport account should I use? Could I use the public MSN ID/Live ID applied from Microsoft (which we use to login MSN messenger) or should be use some other kinds .Net Passport ID?
- I learned if a web site is involved to use .Net Passport based authentication, web site delegates authentication work to .Net Passport login server, and the .Net passport login server is involved to do real authentication and ticket assignment. I am wondering if I use .Net Passport based authentication in the web site I setup, should I configure some .Net passport login server? If ues, how? I searched for quite some time but not found related documents regarding this setup.
thanks in advance,
George
|
|
|
|
|
Hi I am trying to make a Windows Forms Application in C# that uses pin7 (RTS) and pin 5 (Ground) of a 9pin comport to PTT a radio smile.gif
With just one button of the Form when the button is clicked the radio must PTT until it is clicked again !
any help wellcome
Regards
Cyberax
|
|
|
|
|
hello world!
I wanted to access my Images In Database and I write these codes :
byte[] buffer2 = (byte[])dsPicture.Tables["documentImageTable"].Rows[3]["diImage"];
MemoryStream stream2 = new MemoryStream(buffer2);
pictureBox2.Image = Image.FromStream(stream2);
stream2.Close();<pre>
But It have this error:
Object reference not set to an instance of an object.
Tanx world...
modified on Monday, October 20, 2008 1:40 PM
|
|
|
|
|
You should turn option strict on in your project, so that you get an error message telling you that you are using the variable stream1 that is not declared anywhere.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Guffa wrote: option strict
Eslam Afifi
|
|
|
|
|
My problem not solve ...
if(Human.live)
{
Human.peaceful = false;
while(true)
{
Human.love(Human girl, Human Boy);
}
}
|
|
|
|
|
What do you mean? You open stream2 and close stream1 (which doesn't exist in the code that you posted), that is definitely a problem.
It might not be your only problem, though. On which line do you get the error message?
Edit:
You should name your variables to something more descriptive than stream1 and stream2, that way you are not so likely to mix them up.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Guffa wrote: option strict on
Is there even one in C#?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Paul Conrad wrote: Is there even one in C#?
No, you are right. There isn't. I was thinking of VB, where such a mistake is usually caused by not using strict mode.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I writed correctly in my codes but I wrong in this...
what I do for solve this error ...
if(Human.live)
{
Human.peaceful = false;
while(true)
{
Human.love(Human girl, Human Boy);
}
}
|
|
|
|