Click here to Skip to main content
15,918,177 members
Home / Discussions / C#
   

C#

 
AnswerRe: Exporting Data to Multiple Excel Sheets in C# Windows Application Pin
Sandeep Akhare20-Jun-07 3:09
Sandeep Akhare20-Jun-07 3:09 
Questionhow can i make a full row select in a datagrid Pin
-spy-20-Jun-07 1:52
-spy-20-Jun-07 1:52 
AnswerRe: how can i make a full row select in a datagrid Pin
Not Active20-Jun-07 2:24
mentorNot Active20-Jun-07 2:24 
AnswerRe: how can i make a full row select in a datagrid Pin
Stu Richardson20-Jun-07 3:35
Stu Richardson20-Jun-07 3:35 
QuestionProgramming processes in C# - concurrency [modified] Pin
Theghost20-Jun-07 1:22
Theghost20-Jun-07 1:22 
AnswerRe: Programming processes in C# - concurrency Pin
J4amieC20-Jun-07 3:01
J4amieC20-Jun-07 3:01 
QuestionKey Press event of textbox Pin
Sapan Roy20-Jun-07 1:10
Sapan Roy20-Jun-07 1:10 
AnswerRe: Key Press event of textbox Pin
Martin#20-Jun-07 1:16
Martin#20-Jun-07 1:16 
QuestionString Concatenation Issue Pin
Brendan Vogt20-Jun-07 0:44
Brendan Vogt20-Jun-07 0:44 
AnswerRe: String Concatenation Issue Pin
Martin#20-Jun-07 0:51
Martin#20-Jun-07 0:51 
AnswerRe: String Concatenation Issue Pin
Sandeep Akhare20-Jun-07 0:59
Sandeep Akhare20-Jun-07 0:59 
Questionfile server Pin
sureshprabhu20-Jun-07 0:33
sureshprabhu20-Jun-07 0:33 
QuestionSerializing the same object instance twice... Pin
Shy Agam20-Jun-07 0:10
Shy Agam20-Jun-07 0:10 
AnswerRe: Serializing the same object instance twice... [modified] Pin
Martin#20-Jun-07 0:20
Martin#20-Jun-07 0:20 
AnswerRe: Serializing the same object instance twice... Pin
welbers20-Jun-07 0:29
welbers20-Jun-07 0:29 
AnswerRe: Serializing the same object instance twice... Pin
Shy Agam20-Jun-07 0:38
Shy Agam20-Jun-07 0:38 
Questionflicker free fast moving images Pin
wolf70719-Jun-07 23:53
wolf70719-Jun-07 23:53 
AnswerRe: flicker free fast moving images Pin
Martin#20-Jun-07 0:03
Martin#20-Jun-07 0:03 
QuestionCustomizing the grid columns Pin
minkinin19-Jun-07 23:23
minkinin19-Jun-07 23:23 
QuestionUse of trignometric func.??-----------help urgent Pin
Raza568019-Jun-07 23:17
Raza568019-Jun-07 23:17 
AnswerRe: Use of trignometric func.??-----------help urgent Pin
Giorgi Dalakishvili19-Jun-07 23:28
mentorGiorgi Dalakishvili19-Jun-07 23:28 
QuestionZooming in C# using opengl Pin
a_david12319-Jun-07 22:48
a_david12319-Jun-07 22:48 
AnswerRe: Zooming in C# using opengl Pin
a_david12325-Jun-07 20:35
a_david12325-Jun-07 20:35 
QuestionSocket Progamming using UDP Pin
ramdil19-Jun-07 22:31
ramdil19-Jun-07 22:31 
Questionhelp ... Pin
B.A19-Jun-07 22:17
B.A19-Jun-07 22:17 
hi ....
i use follow code in C# for send a request to address: http://www.weather.ir/farsi/current/index.asp?station=99361
and get the response as a string .Sigh | :sigh:

HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(txtAddress.Text);
req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)";
req.Timeout = 60000;
req.KeepAlive = false;
req.Timeout = 60000;
HttpWebResponse res = (HttpWebResponse)req.GetResponse();
System.IO.Stream sm = res.GetResponseStream();


System.Text.Encoding enc = System.Text.Encoding.Default;
switch (ddlEnc.SelectedValue)
{
case "0":
enc = System.Text.Encoding.Default;
break;
case "1" :
enc = System.Text.Encoding.UTF8;
break;
case "2" :
enc = System.Text.Encoding.ASCII;
break;
case "3":
enc = System.Text.Encoding.Unicode;
break;
case "4":
enc = System.Text.Encoding.UTF32;
break;
case "5":
enc = System.Text.Encoding.BigEndianUnicode;
break;
}


System.IO.StreamReader sr = new System.IO.StreamReader(sm, enc);
txtSource.Text = sr.ReadToEnd();
sr.Close();



my problem is : in get string (result of request) some information that i need them is incorrect (i think is for encoding)Confused | :confused:



can you help me to solve this problem
thanks

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.