Mathew Nolton Blog

Software dementia unleashed...

May 2003 - Posts

Visual Studio 1.1

I finally upgraded to Visual Studio 1.1.

Except for the start page, the overall UI experience hasn't changed much. I am glad.

I wonder if the thread started by Josh Ledgard on GotDotNet looking for feedback had anything to do with the changes in version 1.1?.

We are using Oracle here where I am consulting. 1.1 seems to have better support for interacting with RDBMS objects. Maybe now I won't have to use TOAD.

[Listening to: Black Coffee - Everlast - Eat at Whitey's (03:00)]
BlogX
Who out there has done much with BlogX on GotDotNet

I downloaded it and joined the group to contribute and it looks pretty cool. I wanted to get some peoples feedback. If you have something meaningful to say. Please comment.

[Listening to: Lay It on Me - Kid Rock - Cocky (04:56)]
w.Bloggar and Windows Media Player
The other day, I downloaded the Windows Media Player Fun Pack in order to see how this new blogger plug-in thing works. My subsequent post did not contain the music I was listening to ( not that it matters anyway ). So... I decided to read the instructions....I had media player 8 installed...I will never learn...Maybe this time it will work. Regardless of whether or not the blogger plug-in works, the new "Mini-Mode" ( if that's what it is called ) of Media Player 9 makes the download worthwhile. Maybe one of these days, I will have a meaningful post...until then...I will just ramble on.
[Listening to: Trucker Anthem - Kid Rock - Cocky (04:40)]
Sci-Fi Movies

Well, I saw Matrix Reloaded and I just purchased the new Star Trek Nemisis movie for my DVD collection. I really am a geek.

Overall, the first Matrix rules, but the second is very good. The first Matrix was so good because it came in under the radar so your expectations were low and it just blew you away. The second has been so hyped that your expectations are also high. So the delta b/w expectations and reality was larger with the first movie.

Star Trek Nemisis is ok, I have fallen asleep twice trying to watch it. Maybe the 3rd time trying to watch it will be 'The One'.

-Mathew

Matrix Reloaded

I'm off to see the Matrix Reloaded. Should be awesome.

GiddeeeUp.

Setting Focus in ASP.Net

I ran across this article in my search for setting focus to an individual field on page_load

The article was written by Roger McCook. Its real simple and it wouldn't have been hard to figure out, but since Roger figured it out for us, why waste any brain cycles.

protected void setFocus( System.Web.UI.Control ctrl )
{
     string s = "<SCRIPT language='javascript'>document.getElementById('" + ctrl.ID + "').focus() </SCRIPT>";
     this.RegisterStartupScript( "focus", s );
}

to use it you just do this.

this.setFocus( txUserId );

-Mathew Nolton

Posted: May 15 2003, 10:39 AM by MatiasN | with 29 comment(s)
Filed under:
DAV - Distributed Authoring and Versioning

I am going through the process of Uploading and Deleting Files on a remote webserver. When doing this I needed the ability to take a stream object and save it to a remote server. A bit different than the UploadFile() method on System.Net.WebClient.

It was a bit of a pain, so I figured I'd share it with others in order to save them the trouble.

public static WebResponse UploadFile( Stream _inputStream, NetworkCredential _cred, string _httpAddress )
{
          // setup request
          WebRequest request    = WebRequest.Create( _httpAddress );
          request.Credentials       = _cred;
          request.Method             = "PUT";
          request.ContentLength = _inputStream.Length;
          // create byte array
          byte[] byt = new Byte[ checked( ( uint )Math.Min( 8192, _inputStream.Length ) ) ];
          // setup input/output streams
          Stream outputStream = null;
          try
          {
                    outputStream = request.GetRequestStream();
                    // now write the stream
                    int bytesRead = 0;
                    do
                    {
                              bytesRead = _inputStream.Read( byt, 0, byt.Length );
                              if( 0 == bytesRead ) continue;
                              outputStream.Write( byt, 0 , bytesRead );
                    }
                    while( 0 != bytesRead );
                    return request.GetResponse();
          }
          finally
          {
                    // overkill, but it doesn't hurt.
          
         
if
( null != outputStream )
                    {
                              outputStream.Flush();
                              outputStream.Close();
                              outputStream =
null;
                    }
                    // don't bother closing the input stream. we do not own it.
          }
}

I also needed to delete a file on a remote server. This code is based on some code I found on MSDN WebDAVDelete

public static WebResponse DeleteHttpFile( string _uri, NetworkCredential _cred )
{
          WebRequest request = WebRequest.Create( _uri );
          request.Credentials    = _cred;
          request.Method = "DELETE";
          return request.GetResponse();
}

Posted: May 14 2003, 08:15 AM by MatiasN | with no comments
Filed under:
w.Bloggar

Just installed w.bloggar and I am listening to Kid Rock and thinking what ScottW has done for the community is awesome. DotNetWebLogs is a great place to catch up on what everyone is doing and it provides me a place to rant and rave.

About w.bloggar. I really prefer this interface.

Posted: May 01 2003, 02:41 PM by MatiasN | with no comments
Filed under:
More Posts