Intermittent

I may sometimes, possibly, in intervals, sporadically, periodically, and intermittently post things I might, conceivably, likely, peradventurely, and probably feel are of interest. These topics will range from technology, business, entrepreneurship, politics, food, wine, but is not limited to any of these aforementioned things. heh.

Update Progress on Page Load

clock September 10, 2008 13:26 by author Solburn

Complete Source Code: AJAXEnabledWebSite6.rar (14.19 kb)

Jeez you would think this would have been easier to find! Here is what I was looking for:

I wanted a "modal pop up" showing an animated gif and some text that says "Page is loading...". The parent page undeneath the pop up will gray out and the user will not be able to interact with the parent page until the page is done loading, at which time the pop up goes away. Here's the important part. I need this to be kicked off when the page loads.

I am coding in .NET and AJAX is an option.

The first options I tried were CSS/Javascript driven. Basically I found some that were very close, but divs wouldn't cover the whole browser (for me) especially if I could scroll. This was my favorite solution though: Snippets:_Howto_Grey-Out_The_Screen.

There are MANY MANY examples of AJAX ModalPopup but none of the examples I found online worked both when the page was loading and then went away when the page was done rendering. ModalPopup works best with a click event.You would think this.ModalPopup.Show() in Page_Init and this.ModalPopup.Hide() in Page_LoadComplete would work, but it didn't for me.

After pouring over all of those examples, I was led to the UpdateProgress control and the UpdatePanel for .NET's AJAX. I continued to encounter the same issues as I did for the ModalPopup control. It required an event to fire it off and Page_Load wasn't going to work for me. I continued my search and finally found what I was looking for. I found it in a forum post and here is the code base I used:

This code here is NOT modal.

 [code]

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
    protected void Button1_Click(object sender, EventArgs e)
    {
        System.Threading.Thread.Sleep(3000);
        TextBox1.Text = DateTime.Now.ToString();
    }
</script>

<script type="text/javascript">
function delayLoad()
{
document.getElementById("<%= Button1.ClientID %>").click();
document.getElementById("<%= UpdateProgress1.ClientID %>").style.display = "block";
}
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<body onload="javascript: delayLoad()">
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                <div visible="true"><asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /></div>
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
            <ProgressTemplate>
                Waiting..............
            </ProgressTemplate>
        </asp:UpdateProgress>
    </div>
    </form>
</body>
</html>

[/code]

Here is my code with an animated gif and modal:

[code]

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    <script runat="server">
        protected void Button1_Click(object sender, EventArgs e)
        {
            // code to do when button is clicked
            System.Threading.Thread.Sleep(3000);
            TextBox1.Text = DateTime.Now.ToString();
        }
    </script>

    <script type="text/javascript">
        function delayLoad() {
            // simulates the button click event
            document.getElementById("<%= Button1.ClientID %>").click();
           
            // shows the updateprogress control
            document.getElementById("<%= UpdateProgress1.ClientID %>").style.display = "block";
        }
    </script>

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head id="Head1" runat="server">
        <title>Page Load Gray Out</title>
        <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
        <!--[if lt IE 7]> <style type="text/css">@import "ie6.css";</style><![endif]-->
    </head>
   
    <!-- call delayLoad on onload to test -->
    <body onload="javascript: delayLoad()">
        <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server" />
           
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
                <ContentTemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                    <div visible="true"><asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /></div><br /><br />
                   
                    &quot;Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium
                    doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore
                    veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam
                    voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia
                    consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque
                    porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci
                    velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore
                    magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum
                    exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi
                    consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit
                    esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo
                    voluptas nulla pariatur?&quot;<br /><br />
                   
                    &quot;Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium
                    doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore
                    veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam
                    voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia
                    consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque
                    porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci
                    velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore
                    magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum
                    exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi
                    consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit
                    esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo
                    voluptas nulla pariatur?&quot;<br /><br />
                   
                    &quot;Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium
                    doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore
                    veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam
                    voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia
                    consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque
                    porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci
                    velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore
                    magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum
                    exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi
                    consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit
                    esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo
                    voluptas nulla pariatur?&quot;<br /><br />
                   
                    &quot;Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium
                    doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore
                    veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam
                    voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia
                    consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque
                    porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci
                    velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore
                    magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum
                    exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi
                    consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit
                    esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo
                    voluptas nulla pariatur?&quot;<br /><br />
                   
                    &quot;Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium
                    doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore
                    veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam
                    voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia
                    consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque
                    porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci
                    velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore
                    magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum
                    exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi
                    consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit
                    esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo
                    voluptas nulla pariatur?&quot;<br /><br />
                   
                    &quot;Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium
                    doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore
                    veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam
                    voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia
                    consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque
                    porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci
                    velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore
                    magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum
                    exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi
                    consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit
                    esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo
                    voluptas nulla pariatur?&quot;<br /><br />
                   
                    &quot;Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium
                    doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore
                    veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam
                    voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia
                    consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque
                    porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci
                    velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore
                    magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum
                    exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi
                    consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit
                    esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo
                    voluptas nulla pariatur?&quot;<br /><br />
                   
                    &quot;Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium
                    doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore
                    veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam
                    voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia
                    consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque
                    porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci
                    velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore
                    magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum
                    exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi
                    consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit
                    esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo
                    voluptas nulla pariatur?&quot;<br /><br />
                   
                    &quot;Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium
                    doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore
                    veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam
                    voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia
                    consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque
                    porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci
                    velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore
                    magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum
                    exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi
                    consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit
                    esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo
                    voluptas nulla pariatur?&quot;<br /><br />
                   
                    &quot;Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium
                    doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore
                    veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam
                    voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia
                    consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque
                    porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci
                    velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore
                    magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum
                    exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi
                    consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit
                    esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo
                    voluptas nulla pariatur?&quot;<br /><br />
                </ContentTemplate>
            </asp:UpdatePanel>
            <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
                <ProgressTemplate>
                    <%-- This div is the "modal" part --%>
                    <div id="progressBackgroundFilter"></div>
                   
                    <%-- This div shows the animated gif --%>
                    <div id="processMessage">
                         <img alt="Loading" src="images/ajax_loader.gif" align="middle" />
                    </div>
                </ProgressTemplate>
            </asp:UpdateProgress>
        </div>
        </form>
    </body>
    </html>

[/code]

Complete Source Code: AJAXEnabledWebSite6.rar (14.19 kb)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Vista and USB Device Drivers

clock June 11, 2008 10:17 by author Solburn

Unrecognized Device ErrorIn my experience, this has been for USB device drivers.

On Vista, if you have successfully installed drivers and your device is STILL not recognized, go to the device manager and look for unrecognized devices, then right click on it and have Vista find the best driver. It should now find the driver and install it correctly.

OK, this is twice now that I have tried to get USB drivers installed on Vista. Both times there was a driver specifically built for Vista and both had installers that are supposed to just do it for you. One was on my home PC which is now a Vista 64bit machine and the other is my laptop which is a Vista 32bit machine.

First was the WG111T wireless adapter from NetGear of which I have blogged about previously on my PC and the second is my Sky Caddie on my laptop.

The makers of Sky Caddie, Sky Hawke Technologies, has done a fairly good job at automating many of the tasks required to use and keep a Sky Caddie up to date. It has client software (sort of, it runs in a browser) and when you connect your Sky Caddie it will perform an update check and update the firmware as needed.

I was on a road trip, had my laptop and my Sky Caddie and wanted to download a course I would be playing to my Sky Caddie using my laptop. I downloaded the Sky Caddie software which includes the drivers and successfully installed everything I needed. At least that was what the install process reported back to me.

Now I can plug my Sky Caddie in and away we go. Doh! The Sky Caddie client can't find my Sky Caddie even though it is plugged in using the USB port and turned on. Since I had this issue with the WG111T wireless adapter, I checked the device manager. And there it was... USB device not recognized! I right clicked on it and "updated the device driver" and let Vista find the driver. A few seconds later, the driver is installed and my Sky Caddie is now recognized.

For some reason, and I am thinking it is a permissions issue, installer software has not been able to install the correct driver for their own device. I think this could be 1 of 3 things: Vista won't give permission, the installer software was not coded correctly to get permission, or simply a Vista bug.

I will repeat the first paragraph:

On Vista, if you have successfully installed drivers and your device is STILL not recognized, go to the device manager and look for unrecognized devices, then right click on it and have Vista find the best driver. It should now find the driver and install it correctly.

My golf buddies and I ended up shooting par. +3 on the front 9 and -3 on the back 9 =)

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


How to: Zune Movie Music Pictures Air Plane RIP DVD FREE

clock May 5, 2008 08:23 by author Solburn

Zune I went to Chicago this last weekend and that required a flight on an air plane. I never fly without my Zune, NEVER. The older lady (70's) next to me saw my Zune and said, "What is that for?" My reply, "It has music, pictures and movies." "Movies?!", she said. "Oh, yeah", I reply. Oh yeah, movies. 

For all those that are googling this how to: Key words: How to Rip DVD's or movies for a Zune into an MP4 or mpeg-4 format for FREE. =)

I used to only listen to music and look at pictures that I have loaded. Some time in the past two weeks I decided I wanted to load movies. I know Zune supports MP4 and I knew of a few DVD rippers that I could try. After much research and many attempts here is how you rip a dvd into an mp4 format for your Zune. And as you would expect, someone else has already posted step by step directions on how to do this. For some reason it took me a while to find this post:

Anders.com : Converting DVD movies for the Zune using Windows

This post includes links to the FREE software you will need to rip a DVD movie onto your Zune. The directions are clear and come with screen shots although the screen shots may be a bit different than the ones shown, you'll be able to figure it out easily. I think the most important part is making sure that the ripping of the DVD goes into a SINGLE file i.e. "NO FILE SPLITTING". If you miss that step, than the conversion to an .mp4 (mpeg-4) format will not work.

The first movie I converted using the above software and directions was "300" and you get to choose the quality of the conversion. I did a conversion to "MPEG4 QVGA 1024kpbs Stereo/128kpbs." Which I didn't really know what all that meant except it is the high quality video and sound. Well, it turns out it is wide screen and the audio is excellent! There was only a couple of darker scenes where the Zune couldn't handle the levels of black. The fights scenes, the audio, were just awesome. I was really impressed.

I also ripped and converted a second movie "Snatch" of which I have not watched yet. I chose a lower quality conversion, "MPEG4 QVGA 768kpbs Stereo/128kpbs", basically 768 to 1024. When I watch it, I'll let you know how the quality is.

Some other details too: "300" is 5.5 GB raw and after converstion to 1024 kbps mpeg4, it is 833 MB. "Snatch" is 3.4 GB raw and after conversion to 768kbps mpeg4, it is 554 MB.

All in all, I love that I can rip movies to my Zune. I have gen 1 30 GB Zune and because I like it so much, I want the Gen 2 80 GB Zune. I hope this helps and happy ripping!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


How I grew my social network...

clock April 30, 2008 09:49 by author Solburn

Dramatic Angel 02I'm recently divorced, less than a year officially, more than a year unofficially and it was about that time to start meeting new people. So how does one start? Good question.

I already had a twitter account, but that was for different reasons than meeting people. Facebook, MySpace, LinkedIn were all at the top of the buzz list. MySpace creeped me out so that was a no. Facebook looked cool and LinkedIn was fine too. Hmmm, signed up for both, made some connections but I was not "feeling" it. What next?

I am an amateur photographer. Well that's a hobby and I bet other people like it too. I decided to google "Houston Photography". Several sites popped up and I looked through a few of them. Laanba's blog, Photine, caught my attention and really ended up being the linchpin to my entire social network. I read (present tense) all of her posts and she always has something going on in her life and also knows a great deal about the Houston Photography scene. In addition to that, she had a Twitter widget on her blog and I started following her.

I finally sent her an email and introduced myself and told her about my love of photography. I was a COMPLETE NEWB to the online world of photography and said as much to Laanba. She replied with an email that might have been 3 pages long. It was FULL of useful information including links to Flickr photo groups I should join, alternatives to Flickr, and other useful blogs.

I decided to join 3 Flickr groups: Houston, Houston Flickr Weekends, and Houstonist.

A few things happened simultaneously. I was following Laanba on twitter and started following other people she was following to follow the conversations and I started making Flickr contacts. I was also introduced to Yelp during this time, but more on that later. At this point, there are quite a few people I "knew" online through both twitter and Flickr I hadn't actually met yet.

I went to my first Flickr meet up and met Laanba for the first time, Crossmage, and KinjoTx (and a few others). My second meet up I met Jeff Balke, Groovehouse, Erin1225, StephanieDancer, TxTamz, and deji_01 (and a few others).

As you might imagine, most people are on more than one social network site. Many of those people are also on Facebook, twitter, LinkedIn and Yelp.

So through twitter and Flickr I "meet" Fayza. Fayza worked for Yelp and had been twittering about Yelp. I had already heard of Yelp and already had an account, but didn't really do much with it. I check it out again and find out that it is more a social site than I realized. They have Events, both Yelp events and UYEs' (Unofficial Yelp Events).

I went to my first Yelp event. I met Fayza, Cory O., Shao-Tai, AND The_Fuzzball and Erinen31 at Poison Girl. Groovehouse was at this meet up too. The_Fuzzball has a Flickr group called the GLoF (Glorious Ladies of Flickr) and I am invited to join their group as a DMC (Devoted Male Consort), of which I accept.

Through GLoF I meet in person JenniferLynn, DarkHairedGirl, CyberToad (and through CyberToad ChristineBPC), and AggieChristine (and a few others).

I also ventured off with Fazya and Cory O. to an Austin Yelp event and met many people in Austin whom are still contacts in my Yelp world.

As you can see, my social network has grown fairly quickly (it took about 3 months) and exponentially, all from a simple google search and an email to Laanba. There are many more that I have not mentioned too. I count all of these people as friends and naturally I'm closer to some more than others, but I wouldn't hesitate to do what I could for any of them. These are all good people with similar interests as mine. I am privileged to know them all.

With the growth of my twitter, Flickr, and Yelp accounts, Facebook and LinkedIn have now become more useful to me too.

All this from a simple search and well written blog. Thank you Laanba! My life has been rich with social activity because of your blog and your help.

So how does one start? I say google your hobby and see if anyone else in your area does the same thing.

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Ajax enabled master/detail gridview with a hover panel

clock December 13, 2007 08:33 by author Solburn

Here's how I created a master/detail gridview where the detail data is shown in a hover panel.

Imports System.Text

Partial Class _Default

Inherits System.Web.UI.Page

Protected Sub GridView1_PageIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)

'Include three second delay for example only.

System.Threading.Thread.Sleep(3000)

End Sub

Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs)

Me.HiddenField1.Value = e.CommandArgument.ToString()

End Sub

Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs)

'Primary Key from parent

Dim PrimaryKey As String = ""

'Name of the child update panel

Dim childPanel As String = "UpdatePanel2"

'Offset for x and y positions

'Offset is from upper left corner of PARENT object's current page location

Dim offSetX As Integer = 25

Dim offSetY As Integer = 25

'Skip the header and footer rows

If e.Row.RowType = DataControlRowType.DataRow Then

'Get the Datakey

PrimaryKey = Me.GridView1.DataKeys(e.Row.RowIndex).Values("ListId")

'Find the image and add a mouseover attribute to it.

Dim img As Image = CType(e.Row.FindControl("Image1"), Image)

'Mouseover will fire off the custom "DoPostback" javascript function.

'Check the DoPostBack(stringChildPanelName, stringPrimaryKey) javascript function for complete details

img.Attributes.Add("onmouseover", "DoPostback('" + childPanel + "', '" + PrimaryKey + "', this, 25, 25);")

End If

End Sub

' Here is where the hover panel recieves the Primary Key

Protected Sub UpdatePanel2_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles UpdatePanel2.Load

'The __EVENTARGUMENT is the parameter returned by the __doPostBack Javascript function

If Request.Params("__EVENTARGUMENT") IsNot Nothing Then

'I passed in my parameters as a comma separate string; needs to be parsed: primary key, x coordinate, y coordinate

Dim eventArgs() As String = Request.Params("__EVENTARGUMENT").ToString.Split(",")

'Set the hidden field that will be referenced by Child Panel Gridview's datasource

Me.HiddenField1.Value = eventArgs(0).ToString

'Show the div containing the child gridview and set its position using CSS

Me.div_Child.Visible = True

Me.div_Child.Attributes.Add("Style", "overflow:scroll; position:absolute; border:solid 1px navy; background-color:White; width:400px; height:400px; text-align:center; filter: alpha(opacity=95); z-index: 102; left: " + eventArgs(1).ToString + "px; top: " + eventArgs(2).ToString + "px;")

End If

End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)

Me.div_Child.Visible = False

End Sub

End Class

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


MDA Mac Address - How to find it

clock September 26, 2007 16:16 by author Solburn

Took me awhile to find the Mac address of my MDA. Here's how to do it:

  1. Turn on your wifi (doesn't matter if you can connect to anything or not)
  2. Go to  Comm Manager and open Settings - choose Wireless LAN
  3. Along the bottom tabs choose Advanced
  4. Your Mac address will be there and will be in this format xx-xx-xx-xx-xx-xx

You can ONLY get your Mac address when your wifi in ON

Cheers!

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Search

Calendar

<<  November 2008  >>
SuMoTuWeThFrSa
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456

Archive

Tags

Categories


Blogroll

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Sign in