Tuesday, April 29, 2008

Adding MouseOver Images to the ASP.NET 2.0 Menu Control

When using the ASP.NET 2.0 Menu control I was surprised to find that it did not support an image mouseover event to swap images. After doing a Google search and finding the post by Stephen Page at http://www.velocityreviews.com/forums/t117199-menu-control-aspnet-20.html I was able to use his example and develop the following code to implement the functionality. I added the custom attributes of ImageUrl and AltImageUrl to the sitemap file and then used the following ItemDataBound event on the menu control.
protected void _siteMenu_ItemDataBound(object sender, System.Web.UI.WebControls.MenuEventArgs e)
{
// Reference the underlying SiteMapNode object...MenuItem item = (MenuItem)e.Item;SiteMapNode nodeFromSiteMap = (SiteMapNode)e.Item.DataItem;
string onImage = "";string offImage = "";string navUrl = "";
// If we have an imageUrl value, assign it to the menu node's ImageUrl propertyif (nodeFromSiteMap["imageUrl"] != null){onImage = System.Web.HttpContext.Current.Request.ApplicationPath + System.IO.Path.Combine("/Images/Elements/", nodeFromSiteMap["imageUrl"]);offImage = System.Web.HttpContext.Current.Request.ApplicationPath + System.IO.Path.Combine("/Images/Elements/", nodeFromSiteMap["altImageUrl"]);}navUrl = nodeFromSiteMap["url"];
// These objects are necessary in order to capture the image object into a rendered html formatstring src = offImage;string toolTip = "";System.Text.StringBuilder sb = new System.Text.StringBuilder();System.IO.StringWriter sw = new System.IO.StringWriter();HtmlTextWriter htmWriter = new HtmlTextWriter(sw);HtmlImage image = new HtmlImage();
image.Style.Add("border-style", "none");MenuItem theMenuButton = new MenuItem();theMenuButton.NavigateUrl = navUrl;image.Src = src;
if (onImage != "" && onImage != null)image.Attributes["onMouseOver"] = "this.src='" + onImage + "';";if (onImage != "" && onImage != null)image.Attributes["onMouseDown"] = "this.src='" + onImage + "';";image.Attributes["onMouseOut"] = "this.src='" + offImage + "';";image.RenderControl(htmWriter);item.Text = sw.ToString();}
If anyone else has other options I would be glad to hear back from you
.

Monday, April 21, 2008

Security in asp.net 2.0

http://www.communitymx.com/content/article.cfm?page=2&cid=ABF7FD9A43DC2D59

Wednesday, April 9, 2008

E-books

http://rapidshare.com/files/104464696/JAVASCRIPT.rar. ----- javascript
---------------------------------
Microsoft ASP.NET (Video Training/ Mark Long / Certified Instructor)

Title: Microsoft ASP.NETAuthor: Mark Long / Certified InstructorSKU: 33429ISBN: 1932072330Release Date: 2003-05-20Price: Single User: US$ 99.95Multi User(10): US$ 500.00Duration: 7 hrs / 87 lessonsCompatibility: Win Vista, XP, 2000, 98SE, Mac OS X, OS 9, LinuxWork Files: No

Links
http://rapidshare.com/files/60111051...-ASP.part1.rar
http://rapidshare.com/files/60114274...-ASP.part2.rar
http://rapidshare.com/files/60102761...-ASP.part3.rar

Code:
http://rapidshare.com/files/59598327/password.txt
---------------------
asp.net bible(2002) the most comprehensive book for asp.net...
http://rapidshare.com/files/96326463...ble__2002_.pdf

--------------------------------
Wrox Professional ASP.NET 2.0 Databases Feb 2007



Professional ASP.NET 2.0 Databases
504 pages | Publisher: Wrox (February 12, 2007) | Language: English | ISBN-10: 047004179X | 3.6 Mb


Now you can uncover the secrets behind accessing and retrieving data from a wide range of data sources such as SQL Server and XML sources. This book walks you through the array of ADO.NET 2.0 features and clearly shows you how they can be used to develop database-driven web applications in ASP.NET. You’ll first gain an in-depth understanding of the data source controls that enable data binding in the ASP.NET platform. Next you’ll uncover the advanced features of ASP.NET, including site navigation, implementing sorting and paging, and editing data in templates. You’ll then focus on designing transactions in ADO.NET 2.0, displaying data, and utilizing SQL Server 2005 XML. Throughout the chapters, you’ll find examples and source code (with ASP.NET examples written in C#) that you can integrate into your applications. This will enable you to leverage ADO.NET and ASP.NET features so you can easily create a scalable N-Tier web site.

Some of the topics covered include:

* ASP.NET 2.0 Data Controls
* Data Binding with the SqlDataSource Control, XML Data, and Objects
* Selecting, Updating, Deleting Records
* Programmatically Creating and Adding Controls
* XSL Transformations with XmlDataSource Control
* Using Generics with the ObjectDataSource Control
* ASP.NET 2.0 Site Navigation including Implementing Breadcrumbs and Binding to Other Controls
* Displaying and Editing Data Using Templates
* GridView Sorting and Paging
* Advanced Data Source and Data-Bound Controls including Master/Detail Display, Displaying Images from a Database, and Using Themes with Data Bound Controls
* Transactions in .NET and Interoperability between System.Transactions and System.EnterpriseServices
* Advanced ADO.NET for ASP.NET Data Display including DataSet Object, ADO.NET 2.0 DataTable, and Provider-Independent Data Access Code
* Accessing Data from SQL Server 2005 including CLR in SQL Server 2005, New XML Features in SQL Server 2005, and Working with XML Data-Typed Columns from ADO.NET
* N-Tier Architecture with ASP.NET 2.0 and SQL Server 2005
* Best Practices for Creating ASP.NET Web Sites including Implementation of CLR Stored Procedures and Implementation of Layers

http://rapidshare.com/files/24856013/Wrox.Professional.ASP.NET.2.0.Databases.Feb.2007.rar
-------------------------------
Packed with tips, tricks, and workarounds, this book covers every aspect of developing a Web application for the enterprise using ASP.NET and C#. Written by Microsoft insiders, it shows readers how to create the basic, dynamic, and advanced ASP.NET pages in Microsoft's new C# programming language, and explains how to interact with the database using ADO.NET.


http://rapidshare.com/files/28931223/devwappasharp.rar



CSS degin MAster pages n Navigation pdf

http://rapidshare.com/files/66481645...ster.Pages.rar

date formats in sql server 2005

http://msdn2.microsoft.com/en-us/library/ms187928.aspx