Tech Wave

Developing on the Frontline of Technology

Entries Comments


Putting a Silverlight Control inside of a ASP.Net Modal Popup (that works in firefox)

26 March, 2009 (03:53) | AJAX, Asp.Net, Silverlight, Technology, Tutorials | 1 comment


After looking around for a solution to a problem I was having with Silverlight and modal pop-ups I came up empty handed. There were a couple of suggestions that I tried, but they didn’t fix the issue. The issue is that if I place a Silverlight control inside of a modal popup, the Silverlight box would load, but the content wouldn’t work. (This may only apply to the video player, but I think it has further reaches.) I found that this issue only happened in Firefox and not Internet Explorer. I tried using jqModal to see if it would fix the problem, but I found out it didn’t so I reverted back to ASP.net’s Modal popup extender.

After a while I realized that I might be able to apply jqModal’s image cache technique to solve this issue.� Instead of defaulting the CSS display value to hidden, I allowed the underlying panel to be shown (if you have used the Asp.net Modal Pop-up extender before you know that it would sometimes flash it’s content while the massive JavaScript loaded, so the solution was to set the panels display element to hidden). I then used CSS to move the modal window way off screen, knowing that the extender would bring it back to where it needed to be with JavaScript. �For whatever reason, this allows Firefox to load what it needs to for the Silverlight control and fixes the issue.

A code sample of how I fixed the issue is below. Feel free to publish and use this solution.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<asp:ImageButton runat="server" ImageUrl="~/buttonImg.jpg" ID="btnImage" OnClick="btnImage_Click"/>
<style type="text/css">
@media projection, screen {
     div.offScreen { position: absolute; left: -8000px; top: -8000px; }
     div.offScreen img { display:block; }
}
@media print { div. offScreen { display: none; } }
</style>
<div class="offScreen ">
    <asp:Panel ID="pnlVideo" runat="server" CssClass="modalPopup" style="width:300px; ">
<div style="border: 1px solid black; width:328px; height:240px;">
    		         <asp:Silverlight ID="VideoPlayer" runat="server" Source="~/ClientBin/VideoPlayer.xap"
		             InitParameters="m=Media/video.wmv,autohide=true,autostart=true"
                             Width="328px" Height="240px" />
         </div>
<div style="padding: 15px;">
             <asp:Button ID="btnClose" runat="server" Text="Close" OnClick="btnClose_Click" />
         </div>
 
     </asp:Panel>
     <ajax:ModalPopupExtender runat="server" TargetControlID="btnHidden" PopupControlID=" pnlVideo"
         BackgroundCssClass="modalBackground" ID="modalPopup" />
     <asp:Button ID="btnHidden" runat="server" style="display:none;" />
</div>

Microsoft’s PhotoSynth

17 September, 2008 (15:25) | Computer Science, Neumont, Technology | No comments

So, I have been playing around a lot with Photosynth so I could get some practice for a demonstration speech. I find it quite fun, and slightly challenging. My current library of Synth’s now has 2 great productions, 2 mediocre, and 1 lame Synth. Links to my Synth’s are listed below.

There are a couple of limitations that I have noticed. There needs to be lots of texture in the pictures and lots of overlap. I don’t mean your minimal overlap that you would use to make a panoramic picture, I mean like half of the last picture should be in the next. Also, you should always try to give Photosynth a couple things to reference in order to place the picture in the world. Also, what I mean by needing textures is that Photosynth puts things together by finding connections between unique patterns in the pictures, it then uses those in conjunction with all the other photos to figure out the depth of field of the current picture and place it in the world.�

Some of the other limitations are that you need to use IE 7 or 8 or Firefox with an installed plug-in. But the plug-in is necessary at the moment because the internet does not support 3d graphics cards. It also requires windows and a decent 3d graphics card, but it pays off in the end, and most newer laptops and desktops will be able to meet those requirements. And for you privacy nuts, you should make sure you are ready to display your Synth to the world as all Synths are public until further notice.

Links to my Synths are here:

Wahoozi.com sponsored LAN party at Neumont

13 September, 2008 (18:51) | Neumont | No comments

First off I want to thank both the Neumont USG and Wahoozi.com for an spectacular LAN party last night. This turned out to be the USG’s best LAN party ever, and I think most of the credit should go to Wahoozi for that. They provided free pizza, drinks (including tons of my favorite Mountain Dew), and great advertisement flyers to announce the event. The Neumont staff did an excellent job setting up, cleaning up,� and transporting carless students to the event.

Continue reading Wahoozi.com sponsored LAN party at Neumont

WordPress Image Inserting Problems

17 August, 2008 (18:08) | PHP, Technology, WordPress | No comments

A little while ago I had a problem with inserting images into my posts. Wordpress’es uploading feature was working but adding the newly uploaded picture to the post would cause JavaScript errors. I eventually tracked it down to one simple setting that looked totally benign. It turns out that the problem was the capitalization of my WordPress Address in the settings. I was trying to make the URL in the clients browser always display pretty, the problem is that PHP is case sensitive and perhaps so is some of the cross site scripting protection in WordPress. So if you are having problems inserting images that you have uploaded into your posts in word press then make sure that the two address settings are using the proper case (usually all lowercase).

Insertion of images into posts might have problems if there are any capital letters in these boxes

ASP.Net AJAX Control Toolkit and Time

17 August, 2008 (17:32) | AJAX, Asp.Net, Technology | No comments

So, I am currently working as an intern for UCN through my school. Just before my boss went to present the work that my team has been doing on our project our virtual box hosting the site went down. When I came in to work my two full time team members were hard at work trying to get a new virtual box up an running before the presentation. At this time they had just about everything set up except for the AJAX tools that the site relyed on.

Continue reading ASP.Net AJAX Control Toolkit and Time

Recurrence Relations Analysis Via Backward Substitution

3 July, 2008 (02:21) | Computer Science, Theory, Tutorials | 1 comment

I was forced to write a paper for English class called a process paper. I decided to write a walk through on how to do recurrence relation analysis’ because the literature that we were given did not make it easy to understand the process. I feel that my essay is a much better source for teaching someone how these work.� I hope this is a useful resource for all and I release this for any educational use as long as I still receive credit as the author.

word document version

——-HTML version——-

Continue reading Recurrence Relations Analysis Via Backward Substitution

Lenovo and Intel Turbo Memory Part 1

27 June, 2008 (18:38) | Intel Turbo Memory, Lenovo, Technology, Tutorials | No comments

I was recently able to purchase a T61p from Lenovo. Everything worked perfectly except for the Intel Turbo Memory 1GB hard drive cache. One of the main problems that I was experiencing with it was when on battery, if I bumped the computer it would unexpectedly freeze. This freeze was different as everything would get that vista whiteout look telling you that the program was no longer responding. If you clicked on anything it would soon become unresponsive. This eventually meant that the whole computer would be in that wonderful whitewashed color and you were forced to reboot.

Continue reading Lenovo and Intel Turbo Memory Part 1

My First Blog Post

27 June, 2008 (01:57) | Technology | No comments

I am glad to announce to the world my first blog. I did not think I would be one to ever give myself to writing or ever making posts on a blog, but I have found an ever increasing need to share my intellectual findings with others. I intend for this blog to fill that need and I also intend to use this blog as a stage for my opinions about anything I feel is relevant. So “Hello World” and enjoy the reads.