Click here to Skip to main content
15,915,093 members
Home / Discussions / C#
   

C#

 
GeneralRe: Window UI modification in C# Pin
Dave Kreskowiak18-Mar-04 1:44
mveDave Kreskowiak18-Mar-04 1:44 
GeneralRe: Window UI modification in C# Pin
authenticgeek18-Mar-04 20:48
authenticgeek18-Mar-04 20:48 
GeneralRe: Window UI modification in C# Pin
Dave Kreskowiak19-Mar-04 11:10
mveDave Kreskowiak19-Mar-04 11:10 
GeneralRe: Window UI modification in C# Pin
Heath Stewart18-Mar-04 3:50
protectorHeath Stewart18-Mar-04 3:50 
GeneralRe: Window UI modification in C# Pin
K4reem19-Mar-04 0:37
K4reem19-Mar-04 0:37 
GeneralHTTPResponse Threading Pin
K4reem17-Mar-04 14:45
K4reem17-Mar-04 14:45 
GeneralRe: HTTPResponse Threading Pin
Dave Kreskowiak17-Mar-04 16:53
mveDave Kreskowiak17-Mar-04 16:53 
GeneralRe: HTTPResponse Threading Pin
K4reem19-Mar-04 0:31
K4reem19-Mar-04 0:31 
Here's the code i wrote
<br />
int i = 0;<br />
while(DataReader.Read())<br />
 {<br />
  url[i] = new String('u',1);<br />
					<br />
  DateIn[i] = new object();<br />
					<br />
  UserID[i] = DataReader.GetInt32(0);<br />
  url[i] = DataReader.GetString(1);<br />
  DateIn[i] = DateTime.Now;<br />
					<br />
  Req = (HttpWebRequest)WebRequest.Create(url[i]);<br />
				<br />
					<br />
				<br />
  CallBack = new AsyncCallback(AsCallBack);<br />
  i++;<br />
  Req.BeginGetResponse(CallBack,null);<br />
 }<br />

and heres the call back function
<br />
private void AsCallBack(IAsyncResult ar)<br />
 {<br />
  try<br />
   {<br />
    DateOut = new String('S',1);<br />
    Status = new String('T',1);<br />
    Res = (HttpWebResponse)Req.EndGetResponse(ar);<br />
    //here i want to know the value of i, DateIn is identified globally<br />
    DateOut = ((TimeSpan)(DateTime.Now - (DateTime)DateIn[i])).ToString();<br />
    Status = Res.StatusCode.ToString();<br />
   }<br />
    catch(HttpException er)<br />
     {<br />
      Status = er.GetHtmlErrorMessage();<br />
     }<br />
    catch(WebException er)<br />
     {<br />
      Status = er.Status.ToString();<br />
     }<br />
    catch(Exception er)<br />
     {<br />
      Status = er.Message;<br />
     }<br />
  //code for inserting in the db>><br />

thx for ur helpRose | [Rose]
GeneralRe: HTTPResponse Threading Pin
Heath Stewart18-Mar-04 3:44
protectorHeath Stewart18-Mar-04 3:44 
QuestionAbout Web Printing? Pin
jzb17-Mar-04 14:34
jzb17-Mar-04 14:34 
AnswerRe: About Web Printing? Pin
Michael Flanakin17-Mar-04 17:53
Michael Flanakin17-Mar-04 17:53 
GeneralRe: About Web Printing? Pin
jzb17-Mar-04 20:18
jzb17-Mar-04 20:18 
GeneralRe: About Web Printing? Pin
Michael Flanakin19-Mar-04 1:51
Michael Flanakin19-Mar-04 1:51 
AnswerRe: About Web Printing? Pin
Heath Stewart18-Mar-04 3:41
protectorHeath Stewart18-Mar-04 3:41 
GeneralRe: About Web Printing? Pin
Anonymous23-Mar-04 0:35
Anonymous23-Mar-04 0:35 
GeneralForum Board Pin
mil_an17-Mar-04 13:59
mil_an17-Mar-04 13:59 
GeneralRe: Forum Board Pin
Dave Kreskowiak17-Mar-04 16:57
mveDave Kreskowiak17-Mar-04 16:57 
GeneralRe: Forum Board Pin
Michael Flanakin17-Mar-04 17:58
Michael Flanakin17-Mar-04 17:58 
GeneralRe: Forum Board Pin
Dave Kreskowiak18-Mar-04 1:52
mveDave Kreskowiak18-Mar-04 1:52 
GeneralRe: Forum Board Pin
Michael Flanakin19-Mar-04 9:05
Michael Flanakin19-Mar-04 9:05 
GeneralOptimising Code for Image Blur Pin
damianp17-Mar-04 13:42
damianp17-Mar-04 13:42 
GeneralRe: Optimising Code for Image Blur Pin
Heath Stewart17-Mar-04 13:46
protectorHeath Stewart17-Mar-04 13:46 
GeneralRe: Optimising Code for Image Blur Pin
Heath Stewart17-Mar-04 13:49
protectorHeath Stewart17-Mar-04 13:49 
GeneralRe: Optimising Code for Image Blur Pin
damianp17-Mar-04 14:00
damianp17-Mar-04 14:00 
Generalgaining file access from a network Pin
Marveyles17-Mar-04 13:14
Marveyles17-Mar-04 13:14 

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.