Search

You searched for the word(s): userid:622886

Matching Posts

  • Re: Check to see if an array is null

    Yes, that explains why you are getting the NullReferenceException. You are calling ToString() without checking whether the value is null or not. The null check should sort it. Cheers, Wim
    Posted to C# (Forum) by WimH on 7/14/2008
  • Re: Check to see if an array is null

    The same way you check any object for null; so in your case: if (News[i]!=null) { // do stuff } Hope that helps, Wim
    Posted to C# (Forum) by WimH on 7/13/2008
  • Re: Type converter - Convert from string to type

    Darren, If you want to explicitly call ConvertFrom on your typedescriptor, use the following: Corner c = (Corner)TypeDescriptor.GetConverter(typeof(Corner)).ConvertFromString("30 solid"); That will subsequently call your overridden ConvertFrom method in your custom CornerTypeConverter class. Does that help? Cheers, Wim
    Posted to Custom Server Controls (Forum) by WimH on 7/9/2008
  • Re: Problem getting the response from HttpWebRequest

    Right then. Here's a full example of how to perform a HTTP POST using the HttpWebRequest class: HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://yourdomain.com/post.aspx"); req.Method = "POST"; req.ContentType = "application/x-www-form-urlencoded"; string postdata = "var1=value1&var2=value2"; req.ContentLength = postdata.Length; using (StreamWriter sw = new StreamWriter (req.GetRequestStream(), System.Text.Encoding.ASCII)) { sw.Write(postdata
    Posted to Web Forms (Forum) by WimH on 7/8/2008
  • Re: Problem getting the response from HttpWebRequest

    So you are setting the Method property to "POST" ? Cheers, Wim
    Posted to Web Forms (Forum) by WimH on 7/8/2008
  • Re: Problem getting the response from HttpWebRequest

    Some of your code is missing I think, as I don't see anywhere where you pass in the URL plus post parameters. The first obvious error is that you don't seem to be setting the Method property on the Request object to "POST". Request.Method = "POST"; Cheers, Wim
    Posted to Web Forms (Forum) by WimH on 7/8/2008
  • Re: Accessing Session from Global.asax static properties

    Right, that makes sense. Thanks for the update. Wim
    Posted to State Management (Forum) by WimH on 7/8/2008
  • Re: using array

    I'm not sure I understand your question. You talk about a multi-dimensional array but seem to be using a one-demensional one. Can you try and explain in some more detail of what is is you want to achieve? Thanks, Wim
    Posted to C# (Forum) by WimH on 7/5/2008
  • Re: Mail Sending Failed

    Please look 3 lines below where you set the message.Body! You overwrite it again by saying: message.Body = txtMessage.Text; It's effectively the same as doing: string text = "Jack"; text="John"; And now expecting text to contain the string "Jack", which of course it will never do after setting it to "John". Please read and look at your code. So in short, get rid of the line: message.Body = txtMessage.Text; Thanks, Wim
    Posted to Web Forms (Forum) by WimH on 7/4/2008
  • Re: Mail Sending Failed

    Are you sure you followed the instructions I gave you? Can you show your updated code again please. Thanks, Wim
    Posted to Web Forms (Forum) by WimH on 7/4/2008
Page 1 of 29 (290 items) 1 2 3 4 5 Next > ... Last »