Saturday, December 18, 2010

JavaScript and SilverLight

I was trying out some SilverLight usig the project Template from VS Web developer and I wanted to to spawn a simple alert .
To register JavaScript from MailPage.xaml.cs, you need to HtmlPage.RegisterScriptableObject("Page", this);
and use the HtmlPage.Window.Invoke("<jsfunctionname>","<parameter>")

and from JavaScript in Silerlightap...aspx add a function with a simple alert mesaage, a parameter can be used as well
 in xaml:
<Grid x:Name="LayoutRoot" Background="White">
        <TextBlock x:Name="text">text</TextBlock>
  </Grid>
If you have a TextBlock in xaml then that textblock can be accessed from the cs and by using the attribute
[ScriptableMember]   you can write a function to modify some text value the cs, and since its ScriptableMember the value can be passes from JavaScript.

I think the syntax in JavaScriot would be something like
document.getElementById('silverlightControl'); //get the control having a textbox
page.<cs function>(some value);
and this would have the value in the silverlight control

I had read somewhere about this and I cannot find it now, I will do a test ASAP

Wednesday, December 15, 2010

Content Editor WebPart

Is there a way to show an Image on top of the MasterPage of SharePoint portal
I think using a content editor webpart, we can add a div tag with style of position:absolute
like <div style="position: absolute; left: 10px; top: 10px; height: 400px; width: 100px; "><img src=... /></div>

I will try this and update...

Saturday, December 4, 2010

js Calender

This one is probably the best I've seen and has some cool features like multiple date selection, but the best feature it says on the site, that I liked is that it does not depend on any 3rd party library, I haven't tested it but it good on the site
http://www.dynarch.com/projects/calendar/
I downloaded the source, that has a really cool demo,
got to their downloads page http://www.dynarch.com/projects/calendar/download/
much more stuff at  http://www.dynarch.com/

Wednesday, November 24, 2010

Extended GridView

I was trying to get a context menu for a GridView
 by displaying a div with a z-index on the grid wasn't very effective the I found this
http://aspalliance.com/946_Extended_GridView_Control.all
thanx Mr.Bilal Haidar

Sunday, November 21, 2010

ASP.NET MVC

Learning the ASP.NET MVC is quite something for those of us who have made Web Forms all the way, and it's the page controller type of design that is implemented by default in ASP.NET.
Visual Web Developer has the tamplate for MVC project and it automatically creates the Model View Controller Pattern with the folder structure. I think the URL routing to controller classes is a great feature.
To start off I did from http://weblogs.asp.net/scottgu/archive/2007/11/13/asp-net-mvc-framework-part-1.aspx
Its always good to see some code, and see http://www.mvcsharp.org/Getting_started_with_MVCSharp/Default.aspx there is this project on http://www.codeplex.com called Nerddinner its website http://www.nerddinner.com/ is a full fledged web app built on the MVC.

Thursday, November 18, 2010

FacebooK

The other day the question going around the office was 'What's the word starting with f and ending with k'
as I recall, In the forums of actionscripts.org one user had this as his signature and answered the question saying it was 'FiretrucK', this was obviously before FacebooK came about.
Well, the thing is I saw Social Network a while ago, and could'nt help noticing that he (Mark Zuckerberg) picks up user images from a host and creates the who's hot page in php. well I though that Idea would work where we had a folder dump in files and we had to display them like a picture album; Better yet we could have XML files in folders and a XSLT template, and we used the XML control to display the XML files using the template; Sounds easy , I guess...


Tuesday, November 16, 2010

Microsoft flash

      It was Macromedia then came Adobe and now it gonna be Microsoft, see this nytimes
 or so the rumors say -> cnet and zdnet
Its being speculated that Microsoft is buying Adobe, I think this would ease a few things and complicate a few things for the developers. We would have Blend come under flash (MS Expression Blend is the designer for SilverLight), complicated because, the flash guys (including me) wouldnt feel comfortable and the interface of Flash and PhotoShop would  look like blend??
Microsoft would love SilverLight to be the animation platform of the HTML5 browsers.
Even if Silverlight did get a push out of this, there would be loyal flash programmers. Just look at thefwa all the SOTDs (site of the day) are complete flash websites.