<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tech Insight ! &#187; C#.net</title>
	<atom:link href="http://techinsight.dhanashree.com/tag/c-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://techinsight.dhanashree.com</link>
	<description>Technical blog on ASP.Net, PHP, Web Development, Web hosting , Database Programming</description>
	<lastBuildDate>Fri, 12 Aug 2011 07:26:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Custom error tracking library in asp.net using XML &amp; C#</title>
		<link>http://techinsight.dhanashree.com/custom-error-tracking-library-in-asp-net-using-xml-c/</link>
		<comments>http://techinsight.dhanashree.com/custom-error-tracking-library-in-asp-net-using-xml-c/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 09:14:01 +0000</pubDate>
		<dc:creator>kiran</dc:creator>
				<category><![CDATA[.Net 2.0]]></category>
		<category><![CDATA[C#.net]]></category>
		<category><![CDATA[Web Developement]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[.net developement]]></category>
		<category><![CDATA[asp.net developement]]></category>

		<guid isPermaLink="false">http://dhanashree.com/techblog/?p=80</guid>
		<description><![CDATA[
Being an asp.net developers we develop a web project and get it completed in a months of time as there are many organizations which works on very tight bound timeline for developing web sites Or web application projects. And delivers the project to client in months of time
While after project delivery if client come up [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>Being an <a href="http://www.dhanashree.com/web-development-services/asp-php-web-development/dot-net-web-designing" target="_blank">asp.net developers</a> we develop a web project and get it completed in a months of time as there are many organizations which works on very tight bound timeline for <a href="http://www.dhanashree.com/web-development-services/website-designing" target="_blank">developing web sites</a> Or <a href="http://www.dhanashree.com/web-development-services/asp-php-web-development" target="_blank">web application</a> projects. And delivers the project to client in months of time</p>
<p>While after project delivery if client come up saying that they are facing problems or <a href="http://www.dhanashree.com/web-development-services/web-software-application-development" target="_blank">application</a> is giving errors, that time it always becomes a headache for a <a href="http://www.dhanashree.com/web-development-services/asp-php-web-development" target="_blank">developer</a> to test each things even whole project sometimes to find a smaller errors (by means of error here we are not talking about logical errors, we talking about exceptions which mostly responsible for errors in the application), there are many exceptions .net framework fires which we never come to find out while debugging or developing the application. Those exceptions never affect directly to the <a href="http://www.dhanashree.com/web-development-services/web-software-application-development" target="_blank">application</a> but each small exception puts the unnecessary load on the server.</p>
<p>Here is the solution to track each and every smallest things happening inside your <a href="http://www.dhanashree.com/web-development-services/asp-php-web-development/dot-net-web-designing" target="_blank">asp.net web application</a>. Which I named as “<strong>Custom error tracking library</strong>”</p>
<p><strong><em>Custom error tracking library</em></strong></p>
<p>Very first question will come is that, what is the core concept for this.</p>
<p>Concept is like we will be maintaining an XML file with a predefined structure which I have built which will contain all the required fields as nodes and subs. Which we call as <strong>errorlog.xml</strong></p>
<p>There will be a CS library file which will track each and every minor errors/exceptions happens inside the <a href="http://www.dhanashree.com/web-development-services/web-software-application-development" target="_blank">application</a> or .net framework and will put the error details inside the XML file.</p>
<p>Once we got CS library ready with us we just have to a simple function with 2 overload methods as per requirement in each <strong>try/catch</strong> blocks of the code and also in <strong>Application_Error </strong>event of <strong>Global.asax</strong> file.</p>
<h3><em>XML File (errorlog.xml)</em></h3>
<p>&lt;?xml version=”1.0″ encoding=”utf-8″?&gt;</p>
<p>&lt;errorlog&gt;</p>
<p>&lt;error&gt;</p>
<p>&lt;datetime&gt;datetime&lt;/datetime&gt;</p>
<p>&lt;filename&gt;filename&lt;/filename&gt;</p>
<p>&lt;classname&gt;classname&lt;/classname&gt;</p>
<p>&lt;methodname&gt;methodname&lt;/methodname&gt;</p>
<p>&lt;errormethod&gt;errormethod&lt;/errormethod&gt;</p>
<p>&lt;messsage&gt;ErrorMessage&lt;/messsage&gt;</p>
<p>&lt;errordetails&gt;Details goes here&lt;/errordetails&gt;</p>
<p>&lt;IP&gt;IP adress&lt;/IP&gt;</p>
<p>&lt;url&gt;URL&lt;/url&gt;</p>
<p>&lt;/error&gt;</p>
<p>&lt;error&gt;</p>
<p><strong>&lt;/</strong><strong>errorlog</strong><strong>&gt;</strong></p>
<p>Root node of XLM file will be <strong>&lt;errorlog&gt;&lt;/errorlog&gt;</strong> inside root node there will be a sub node  <strong>&lt;error&gt;&lt;/error&gt;</strong> which will get duplicated for each error. For each error, library will generate a node will all the below listed details in XML file. Next to last error node. So for each error there will be a seaprate ERROR node.</p>
<p>Each fields of the above XML file is descibed beloe :</p>
<ol>
<li><strong>1. </strong><strong>Datetime : </strong>date and time of the error/exception<strong> </strong></li>
<li><strong>2. </strong><strong>File name : </strong>file name where exception or error happens<strong> </strong></li>
<li><strong>3. </strong><strong>Class name : </strong>classname in which error occurred<strong> </strong></li>
<li><strong>4. </strong><strong>Methodname : </strong>function name where errored<strong> </strong></li>
<li><strong>5. </strong><strong>Errormethod :</strong> name of the function which contains error code.<strong> </strong></li>
<li><strong>6. </strong><strong>Message : </strong>error message/exception message<strong> </strong></li>
<li><strong>7. </strong><strong>Error details: </strong>detailed error description which will show whole<strong>stack trace</strong> of the functional execution.<strong> </strong></li>
<li><strong>8. </strong><strong>IP : </strong>client IP address<strong> </strong></li>
<li><strong>9. </strong><strong>URL : </strong>absolute error ULR<strong> </strong></li>
</ol>
<p><strong> </strong></p>
<p><strong> </strong></p>
<h3><em>CS library</em></h3>
<p>There will be a CS library file where we will write all functionality for error handling and writing errors into XML file.</p>
<p><strong>errorHamdler.cs </strong>file will<strong> </strong>have 2 statis methods named <strong>WriteError(), </strong>there will be 2 overloaded methods for same functions with diff. parameters.</p>
<p><strong>CS file will look as given below. We name it as errorHamdler.cs</strong></p>
<h3>errorHandler.cs</h3>
<p>using System;</p>
<p>using System.Collections.Generic;</p>
<p>using System.Text;</p>
<p>using System.Xml;</p>
<p>using System.Reflection;</p>
<p>using System.Diagnostics;</p>
<p>namespace code_center</p>
<p>{</p>
<p>public class errorHandler</p>
<p>{</p>
<p>string _strErrorMessage, _strDetails, _strClassName, _strMethodName;</p>
<p>DateTime _dtOccuranceTime = new DateTime();</p>
<p>public errorHandler()</p>
<p>{</p>
<p>}</p>
<p>public errorHandler(DateTime time, string className, string methodName, string errorMessage, string details)</p>
<p>{</p>
<p>_dtOccuranceTime = time;</p>
<p>_strClassName = className;</p>
<p>_strDetails = details;</p>
<p>_strErrorMessage = errorMessage;</p>
<p>_strMethodName = methodName;</p>
<p>}</p>
<p>public static void WriteError(Exception ex)</p>
<p>{</p>
<p>WriteError(ex, “”);</p>
<p>}</p>
<p><strong>public static void WriteError(Exception ex, string fileName)</strong></p>
<p>{</p>
<p>XmlDocument doc = new XmlDocument();</p>
<p>string strRootPath = System.Configuration.ConfigurationManager.AppSettings["logfilepath"].ToString();</p>
<p>string xmlPath = System.Web.HttpContext.Current.Server.MapPath(strRootPath);</p>
<p>doc.Load(@xmlPath);</p>
<p>XmlNode newXMLNode, oldXMLNode;</p>
<p>oldXMLNode = doc.ChildNodes[1].ChildNodes[0];</p>
<p>newXMLNode = oldXMLNode.CloneNode(true);</p>
<p>StackTrace stackTrace = new StackTrace();</p>
<p>StackFrame stackFrame = stackTrace.GetFrame(1);</p>
<p>MethodBase methodBase = stackFrame.GetMethod();</p>
<p>newXMLNode.ChildNodes[0].InnerText = DateTime.Now.ToString();</p>
<p>newXMLNode.ChildNodes[1].InnerText = fileName;</p>
<p>newXMLNode.ChildNodes[2].InnerText = methodBase.DeclaringType.FullName;</p>
<p>newXMLNode.ChildNodes[3].InnerText = methodBase.Name;</p>
<p>newXMLNode.ChildNodes[4].InnerText = ex.TargetSite.Name;</p>
<p>newXMLNode.ChildNodes[5].InnerText = ex.Message;</p>
<p>newXMLNode.ChildNodes[6].InnerText = ex.StackTrace;</p>
<p>newXMLNode.ChildNodes[7].InnerText = System.Web.HttpContext.Current.Request.UserHostAddress;</p>
<p>newXMLNode.ChildNodes[8].InnerText = System.Web.HttpContext.Current.Request.Url.OriginalString;</p>
<p>doc.ChildNodes[1].AppendChild(newXMLNode);</p>
<p>doc.Save(@xmlPath);</p>
<p>doc.RemoveAll();</p>
<p>}</p>
<p>}</p>
<p>}</p>
<p>In above code there is a line “string strRootPath = System.Configuration.ConfigurationManager.AppSettings["logfilepath"].ToString();”</p>
<p>We need to give XML file path also where we have placed XML file in the project, so just have to add 1 line in web.config file as given below to store actual XML file path, which will be used in abiove functon.</p>
<h3><em>Code inside web.config</em></h3>
<p>&lt;appSettings&gt;</p>
<p>&lt;add key=”logfilepath” value=”~/errorHandling/errorlog.xml”/&gt;</p>
<p>&lt;/appSettings&gt;</p>
<h1><em>How to use error handler in application</em></h1>
<p>Now everything is ready to be used in real time<a href="http://www.dhanashree.com/web-development-services/web-software-application-development" target="_blank"> application</a>. In each <strong>try/catch</strong>block we have to call</p>
<p><strong>Writeerror()</strong> function as described below .</p>
<h3><em>Code inside Default.aspx.vb</em></h3>
<p>protected void Page_Load(object sender, EventArgs e)</p>
<p>{</p>
<p>try</p>
<p>{</p>
<p>throw new Exception(“Custom error”);</p>
<p>}</p>
<p>catch (Exception ex)</p>
<p>{</p>
<p>Response.Write(ex.Message);</p>
<p><strong>code_center.errorHandler.WriteError(ex, “Default.aspx.vb”);</strong></p>
<p>}</p>
<p>}</p>
<p>Apart from each <strong>try/catch</strong> blocks we will put some code in <strong>Global.asax </strong>file also, as given below.</p>
<p>void Application_Error(object sender, EventArgs e)</p>
<p>{</p>
<p>code_center.errorHandler.WriteError(Server.GetLastError().GetBaseException(), “Global.asax”);</p>
<p>}</p>
<p>The reason behind putting code in Global.asax file is very important and necessory as there might be many exceptions which occurs at application level and canot be tracable in any <strong>try/catch</strong> blocks in any function or events. So anyerror except try/catch blocks will come in this event (Application_Error) and will get inserted intoXML file.</p>
<p>That’s it, we have done with the error handling, and all errors will be tractable from the XML file which is being generated via the error handler.</p>
</div>
<p><span style="text-decoration: underline;"><strong><em><br />
</em></strong></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="color: red;" lang="EN-IN"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><br />
NOTE<span style="mso-spacerun: yes;"> </span>:</span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span lang="EN-IN"><span style="font-size: 11pt; font-family: Calibri;">If you are in need of any </span><a href="http://dhanashree.com/web-development-services/asp-php-web-development" target="_blank"><span style="font-size: 11pt; font-family: Calibri;">Web Development</span></a><span style="font-size: 11pt; font-family: Calibri;"> feel free to <span style="text-decoration: underline;"><a href="http://dhanashree.com/contact-web-designing-company" target="_blank">Inquire us</a></span> .<span style="mso-spacerun: yes;"> </span><span style="text-decoration: underline;"><a href="http://dhanashree.com/" target="_blank">Dhanashree Inc</a></span>. Expertise in <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/asp-php-web-development/dot-net-web-designing" target="_blank">Asp.net Development</a></span>, <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/asp-php-web-development/lamp-development-php-web-designing" target="_blank">Php Development</a></span>,<span style="mso-spacerun: yes;"> </span><span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/website-designing" target="_blank">Website designing</a></span>, <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/open-source-wordpress-joomla-oscommerce-customisation" target="_blank">Open Source customisation</a></span>. <span style="text-decoration: underline;"><a href="http://dhanashree.com/" target="_blank">Dhanashree Inc</a> </span>can be our <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/offshore-website-designing-company" target="_blank">offshore development company</a></span> / </span><a href="http://dhanashree.com/web-designing-outsource-advantages" target="_blank"><span style="font-size: 11pt; font-family: Calibri;">outsourcing</span></a><span style="font-size: 11pt; font-family: Calibri;"> <span style="text-decoration: underline;"><a href="http://dhanashree.com/dhanashree-web-development-profile" target="_blank">web development company</a></span>, <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/dedicated-php-dotnet-developer" target="_blank">hire dedicated web programmers</a></span>.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span lang="EN-IN"><span style="font-size: 11pt; font-family: Calibri;">Above information is for knowledge sharing<span style="mso-spacerun: yes;"> </span>if you have problem / issue / suggestion please intimate us with details for proper and prompt action.</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://techinsight.dhanashree.com/custom-error-tracking-library-in-asp-net-using-xml-c/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>List of technology which can be adopted into development</title>
		<link>http://techinsight.dhanashree.com/list-of-technology-which-can-be-adopted-into-development/</link>
		<comments>http://techinsight.dhanashree.com/list-of-technology-which-can-be-adopted-into-development/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 07:51:15 +0000</pubDate>
		<dc:creator>kiran</dc:creator>
				<category><![CDATA[.Net 2.0]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tools & Technology]]></category>
		<category><![CDATA[Web Developement]]></category>
		<category><![CDATA[.net developement]]></category>
		<category><![CDATA[asp.net developement]]></category>
		<category><![CDATA[C#.net]]></category>

		<guid isPermaLink="false">http://dhanashree.com/techblog/?p=77</guid>
		<description><![CDATA[Business Intelligence Application Development
 
Companies are investing millions of dollars in ERP solutions or have invested till date to improve the way they conduct their business. While ERP provides significant benefits organizations are finding that, in order to achieve critical decision making business goals, they often need to supplement it with additional external reporting capabilities [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Business Intelligence <a href="http://www.dhanashree.com/web-development-services/web-software-application-development" target="_blank">Application Development</a></strong></p>
<p><strong> </strong></p>
<p>Companies are investing millions of dollars in ERP solutions or have invested till date to improve the way they conduct their business. While ERP provides significant benefits organizations are finding that, in order to achieve critical decision making business goals, they often need to supplement it with additional external reporting capabilities for it end users. With the wealth of data entered and stored in ERP databases the ability to analyze and interpret the data is significant for management reporting. With Business Intelligence tool, it has greatly alleviated the backlog of report requests and has provided users with decision making information in a timely manner.</p>
<p>Business Intelligence is a method of storing and presenting key enterprise data so that anyone in your company can quickly and easily ask questions of accurate and timely data. Effective BI allows end users to use data to understand why your business got the particular results that it did, to decide on courses of action based on past data, and to accurately forecast future  results.</p>
<p>BI data is displayed in a fashion that is appropriate to each type of user, i.e. analysts will be able to drill into detailed data, executives will see timely summaries, and middle managers will see data presented at the level of detail that they need to make good business decisions. Microsoft’s BI uses cubes, rather than tables, to store information and presents information via reports. The reports can be presented to end users in a variety of formats:Windows applications,<a href="http://www.dhanashree.com/web-development-services/asp-php-web-development" target="_blank">Web Applications</a>, and Microsoft BI client tools, such</p>
<p>as Excel or SQL Reporting Services.</p>
<p>Need for the BI application:</p>
<p>Check out following article where it is explain what is the important of BI application</p>
<p><a href="http://www.cio.com/article/153500/Need_for_Business_Intelligence_Grows_Too_Much_Information_Not_Enough_Insight">http://www.cio.com/article/153500/Need_for_Business_Intelligence_Grows_Too_Much_Information_Not_Enough_Insight</a></p>
<p>Microsoft products involved in BI <a href="http://www.dhanashree.com/web-development-services/web-software-application-development" target="_blank">application development</a>:</p>
<p><strong>SQL Server 2005</strong>: This is the preferred staging and, possibly, source location for BI solutions. Data can actually be retrieved from a variety of data stores (Oracle, DB2, and so on), so a SQL Server installation is not strictly required to build a Microsoft BI solution. However, due to the integration of some key toolsets that are part of nearly all BI solutions—for example, SSIS or SQL Server Integration Services, which is usually used to perform the ETL of source data into the data warehouse—most BI solutions will include at least one SQL Server 2005 installation. Another key component in many BI solutions is SQL Server Reporting Services (SSRS). When working with SQL Server to perform OLAP administrative tasks, you will use the management interface, which is called SQL Server Management Studio (SSMS).</p>
<p><strong>SQL Server Analysis Service</strong>: This is the core server in Microsoft’s BI solution. SSAS provides storage for the data used in cubes for your data warehouse.</p>
<p><strong>SQL Server 2005 Integration Service</strong>: This toolset is a key component in most BI solutions that is used to import, cleanse, and validate data prior to making the data available to the  analysis Services for reporting purposes. It is typical to use data from many disparate sources (relational, flat file, XML, and so on) as source data to a data warehouse. For this reason, a sophisticated toolset, such as SSIS is used to facilitate the complex data loads that are often common to BI solutions. As stated earlier, this functionality is often called ETL (Extract, Transform, and Load) in a BI solution.</p>
<p><strong>SQL Server 2005 Reporting Service</strong>: This is an optional component for your BI solution.</p>
<p><strong>Excel 2003 and 2007: </strong>This is another optional component for your BI solution. Many  companies already own Office 2003, so use of Excel as a BI client is often attractive for its low cost and (relatively) low training curve.</p>
<p><strong> </strong></p>
<p>Apart from Microsoft BI solution, there are number of other solution provider are there in market.</p>
<p>Following are the list of BI solution &amp; tools provider</p>
<p>Cognos: <a href="http://www.cognos.com/products/cognos8businessintelligence/index.html">http://www.cognos.com/products/cognos8businessintelligence/index.html</a></p>
<p>SAP: <a href="http://www.sap.com/solutions/netweaver/components/bi/index.epx">http://www.sap.com/solutions/netweaver/components/bi/index.epx</a></p>
<p>Business Object: <a href="http://www.uk.businessobjects.com/products/platform/enterprise.asp">http://www.uk.businessobjects.com/products/platform/enterprise.asp</a></p>
<p>Oracle: <a href="http://www.oracle.com/solutions/business_intelligence/index.html">http://www.oracle.com/solutions/business_intelligence/index.html</a></p>
<p><strong><span style="text-decoration: underline;"><br />
</span></strong></p>
<p><strong><span style="text-decoration: underline;"> </span></strong></p>
<p><strong><span style="text-decoration: underline;">SharePoint Portal Service/Server</span></strong></p>
<p><strong><span style="text-decoration: underline;"> </span></strong></p>
<p>Microsoft Windows SharePoint Services 3.0 is a versatile technology that organizations and business units of all sizes can use to increase the efficiency of business processes and improve team productivity. With tools for collaboration that help people stay connected across organizational and geographic boundaries, Windows SharePoint Services gives people access to information they need.</p>
<p>Built on Microsoft Windows Server 2003, Windows SharePoint Services also provides a  foundation platform for building <a href="http://www.dhanashree.com/web-development-services/web-software-application-development/business-communication-sytems" target="_blank">Web-based business applications</a> that can flex and scale easily to meet the changing and growing needs of your business. Robust administrative controls for managing storage and Web infrastructure give IT departments a cost-effective way to implement and manage a high-performance collaboration environment. With a familiar, <a href="http://www.dhanashree.com/web-development-services/asp-php-web-development" target="_blank">Web-based interface</a> and close integration with everyday tools including the Microsoft Office system, Windows SharePoint Services is easy to use and can be deployed rapidly</p>
<p>Need of SharePoint?</p>
<p>• As companies grow so does the amount of their files. It soon becomes difficult to keep track of the multiplying documents and their locations.  SharePoint overcomes this by allowing you to store and share your files in a central site.</p>
<p>• Sharing work files through email is a cumbersome process.  SharePoint eliminates this by allowing files to be stored in one location, allowing easy access to all team members.</p>
<p>• Business Intelligence has traditionally remained in the hands of a few key decision makers within organizations.  For years, it has been the goal of BI providers to “democratize business intelligence” by making it available to all levels of workers throughout companies.  With the addition of PerformancePoint to the SharePoint Enterprise version of SharePoint, this vision is realized, finally taking business intelligence out of the hands of the few and into the hands of many.</p>
<p>• Today’s work occurs over multiple locations, whether it is in different countries, office locations, separate departments or at your home office. SharePoint enables teams and individuals to connect and collaborate together regardless of where they are located.</p>
<p>• Surveys have shown that employees can spend up to 20 – 30 % of their day searching for data and information.  SharePoint eliminates this drag on productivity by providing the robust search functionality needed to find the information and expertise buried in the thousands, or hundreds of thousands of files a company generates in the course of business.</p>
<p>• It’s difficult and time consuming to create and maintain sites.  SharePoint allows anyone to <a href="http://www.dhanashree.com/web-development-services" target="_blank">create sites</a> for use within their company’s Intranet, as they are needed, whether they are departmental sites, document libraries, meetings sites, survey sites, or discussion boards.</p>
<p>Ref: <a href="http://office.microsoft.com/en-us/sharepointserver/FX100492001033.aspx">http://office.microsoft.com/en-us/sharepointserver/FX100492001033.aspx</a></p>
<p><strong><span style="text-decoration: underline;"><br />
</span></strong></p>
<p><strong><span style="text-decoration: underline;">iPhone Application Development</span></strong></p>
<p><strong><span style="text-decoration: underline;"> </span></strong></p>
<p><strong><span style="text-decoration: underline;"> </span></strong></p>
<p>iPhone is Revolutionary device which is designed and marketed by Apple Inc. iPhone provides downgraded version of OS framework to Mac OS X framework. iPhone has Cocoa Touch Framework.</p>
<p>Development tools involved in <a href="http://www.dhanashree.com/web-development-services/mobile-application-iphone-application-anoroid-development" target="_blank">IPhone application development</a>:</p>
<p><strong>XCode</strong>: Complete <a href="http://www.dhanashree.com/web-development-services" target="_blank">development</a> environment provides project management, a powerful source editor, and a graphical debugger</p>
<p><strong>iPhone Simulator</strong>: Run, test, and debug your <a href="http://www.dhanashree.com/web-development-services/web-software-application-development" target="_blank">application</a> locally on your Mac using a simulated iPhone</p>
<p><strong>Instruments</strong>: Collect, display, and compare performance data graphically in real-time to optimize your application.</p>
<p><strong>Interface Builder: </strong>Interface Builder makes <a href="http://www.dhanashree.com/web-development-services/website-designing" target="_blank">designing</a> a user interface as easy as drag and drop.</p>
<p>The more detail on the <a href="http://www.dhanashree.com/web-development-services/mobile-application-iphone-application-anoroid-development" target="_blank">iPhone application development</a>, check out the official “iPhone Developer Program” website.</p>
<p><a href="http://developer.apple.com/iphone/program/">http://developer.apple.com/iphone/program/</a></p>
<p><strong><em><span style="text-decoration: underline;">Development Related</span></em></strong></p>
<p><strong> </strong></p>
<p><strong><span style="text-decoration: underline;">ORM</span></strong></p>
<p>Object-relational mapping is used to map object-oriented programming objects to relational databases managed by Oracle, DB2, Sybase, and other relational database managers (RDBMSs). This site provides facts about object-relational mapping products, architecture problem-solving, and direction in product comparison and selection.</p>
<p>Object-relational mapping products are designed to work well with object programming languages such as C#, C++, and Java. Database objects appear as programming language objects. Often, the interface for object-relational mapping products is the same as the interface for object-oriented databases.</p>
<p><strong>ORM tools for .Net</strong></p>
<p>ADO.NET Entity Framework is an <a title="Object-relational mapping" href="http://en.wikipedia.org/wiki/Object-relational_mapping">object-relational mapping</a> (ORM) framework for the <a title=".NET Framework" href="http://en.wikipedia.org/wiki/.NET_Framework">.NET Framework</a>. This framework is an ORM offering from Microsoft for the <a title=".NET Framework" href="http://en.wikipedia.org/wiki/.NET_Framework">.NET Framework</a></p>
<p><a href="http://www.dhanashree.com/web-development-services/asp-php-web-development/dot-net-web-designing" target="_blank">ADO.NET</a> Entity Framework is included with <a href="http://www.dhanashree.com/web-development-services/asp-php-web-development/dot-net-web-designing" target="_blank">.NET</a> Framework 3.5 Service Pack 1 and <a title="Microsoft Visual Studio" href="http://en.wikipedia.org/wiki/Microsoft_Visual_Studio">Visual Studio 2008</a> Service Pack 1, released on 11 Aug 2008. It also includes the capability of executing <a title="Language Integrated Query" href="http://en.wikipedia.org/wiki/Language_Integrated_Query">LINQ</a> against ADO.NET Entity Framework entities.</p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong>ORM for PHP</strong></p>
<p><strong> </strong></p>
<p>There are several tools available right now for implementing ORM technique in PHP.</p>
<p>Following are the list of few ORM tools which can be used with PHP.</p>
<ul>
<li><a href="http://cakephp.org/">CakePHP</a>’s ORM layer</li>
<li><a href="http://www.symfony-project.org/">Symfony</a></li>
<li><a href="http://www.phpdoctrine.org/">Doctrine</a></li>
<li><a href="http://propel.phpdb.org/trac/">Propel</a></li>
</ul>
<p>Check out following articles which demonstrate you in detail ORM implementation in PHP.</p>
<p><a href="http://www.developertutorials.com/blog/php/getting-started-with-orm-in-php-331/">http://www.developertutorials.com/blog/php/getting-started-with-orm-in-php-331/</a><br />
<strong><span style="text-decoration: underline;">Microsoft .Net 3.5</span></strong></p>
<p>There are several .NET language enhancements to be introduced with Visual Studio 2008 including implicitly typed variables, extension methods, anonymous types, object initializers, collection initializers and automatic properties. These language enhancements, along with features like generics, are critical to the use of some of the new features, such as LINQ with the ADO.NET Entity Framework.</p>
<p>These are the such enhancements in .net framework which really can bust development as well as productivity of <a href="http://www.dhanashree.com/web-development-services/dedicated-php-dotnet-developer" target="_blank">developers</a>.</p>
<p>Following are the few of articles which demonstrate the practical usage of new .net framework 3.5 enhancement.</p>
<p><a href="http://www.simple-talk.com/dotnet/.net-framework/.net-3.5-language-enhancements/">http://www.simple-talk.com/dotnet/.net-framework/.net-3.5-language-enhancements/</a></p>
<p><strong><span style="text-decoration: underline;">MVC framework</span></strong></p>
<p>MVC is a framework methodology that divides an application&#8217;s implementation into three component roles: models, views, and controllers.</p>
<ul>
<li>&#8220;Models&#8221;      in a MVC based application are the components of the application that      are responsible for maintaining state.  Often this state is      persisted inside a database (for example: we might have a Product class      that is used to represent order data from the Products table inside SQL).</li>
</ul>
<ul>
<li>&#8220;Views&#8221;      in a MVC based application are the components responsible for      displaying the application&#8217;s user interface.  Typically      this UI is created off of the model data (for example: we might      create an Product &#8220;Edit&#8221; view that surfaces textboxes, dropdowns      and checkboxes based on the current state of a Product object).</li>
</ul>
<ul>
<li>&#8220;Controllers&#8221;      in a MVC based application are the components responsible for      handling end user interaction, manipulating the model, and ultimately      choosing a view to render to display UI.  In a MVC application the      view is only about displaying information &#8211; it is the controller that      handles and responds to user input and interaction.</li>
</ul>
<p>One of the benefits of using a MVC methodology is that it helps enforce a clean separation of concerns between the models, views and controllers within an <a href="http://www.dhanashree.com/web-development-services/web-software-application-development" target="_blank">application</a>.  Maintaining a clean separation of concerns makes the testing of applications much easier, since the contract between different application components are more clearly defined and articulated.</p>
<p>The MVC pattern can also help enable red/green <a href="http://en.wikipedia.org/wiki/Test-driven_development" target="_blank">test driven development</a> (TDD) &#8211; where you implement automated unit tests, which define and verify the requirements of new code, first before you actually write the code itself.</p>
<p><strong>MVC Framework for .NET</strong></p>
<p>The <a href="http://www.dhanashree.com/web-development-services/asp-php-web-development/dot-net-web-designing" target="_blank">ASP.NET</a> MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating MVC-based <a href="http://www.dhanashree.com/web-development-services/asp-php-web-development" target="_blank">Web applications</a></p>
<p>Check out following articles for the overview of ASP.NET MVC framework</p>
<p><em><a href="http://www.asp.net/learn/mvc/tutorial-01-cs.aspx">http://www.asp.net/learn/mvc/tutorial-01-cs.aspx</a></em></p>
<p><em> </em></p>
<p><strong>MVC Framework for PHP</strong></p>
<p>php.MVC implements the Model-View-Controller (MVC) design pattern, and encourages application design based on the Model 2 paradigm. This design model allows the Web page or other contents (View) to be mostly separated from the internal application code (Controller/Model), making it easier for <a href="http://www.dhanashree.com/web-development-services/website-designing/website-designing-services" target="_blank">designers</a> and <a href="http://www.dhanashree.com/web-development-services/asp-php-web-development" target="_blank">programmers</a> to focus on their respective areas of expertise.</p>
<p>Reference: <a href="http://www.phpmvc.net/">http://www.phpmvc.net/</a><br />
<strong><span style="text-decoration: underline;">IIS Search Engine Optimization Toolkit</span></strong></p>
<p>The IIS <a href="http://www.dhanashree.com/web-development-services/search-engine-promotion-submission" target="_blank">Search Engine Optimization</a> (SEO) Toolkit helps <a href="http://www.dhanashree.com/web-development-services/asp-php-web-development" target="_blank">Web developers</a>, hosting providers, and Web server administrators to improve their Web site’s relevance in search results by recommending how to make the site content more search engine-friendly. The IIS <a href="http://www.dhanashree.com/web-development-services/search-engine-promotion-submission" target="_blank">SEO</a> Toolkit includes the Site Analysis module, the Robots Exclusion module, and the Sitemaps and Site Indexes module, which let you perform detailed analysis and offer recommendations and editing tools for managing your Robots and Sitemaps files.</p>
<p>The components of IIS Search Engine Optimization Toolkit include the following features:</p>
<ol>
<li>Site Analysis:</li>
</ol>
<p>1.1. Fully featured site crawling engine &#8211; in order to perform detailed analysis of site&#8217;s structure and content, Site Analysis tool uses a built-in web crawler, called &#8220;iisbot&#8221;, to download and cache all the publicly available web site content. The web crawler is fully compliant with robots exclusion protocol.</p>
<p>1.2. Report summary dashboard &#8211; the results of site analysis are presented in an easy to use dashboard page that serves as a start page for various types of analysis. In addition this page includes a large set of pre-built queries for most common reports.</p>
<p>1.3. Query builder &#8211; Site Analysis tool includes a powerful and flexible query builder user interface that lets you create any custom queries that are run against the cached web site content.</p>
<p>1.4.  Detailed URL information &#8211; you can obtain various detailed information about every URL in your web site, such as response headers and content, the pages that link to that URL as well as all the referenced URLs.</p>
<p>1.5. Detailed Violations descriptions &#8211; each content or SEO violation found on a web site has a detailed description as well as a recommended corrective action.</p>
<p>1.6. Word Analysis &#8211; any web page can be analyzed with regards to the most commonly used words and phrases within the content of that page. The results of that analysis can be used to select the keywords that most accurately describe the content of the page.</p>
<p>1.7. Route Analysis &#8211; unique routes to any page can be displayed in a separate report. This kind of information helps better understand how search engine and site visitors reach a particular page on your web site.</p>
<ol>
<li>Robots Exclusion</li>
</ol>
<p>2.1.   User interface for editing robots.txt file &#8211; the content of the robots exclusion file &#8211; robots.txt &#8211; can be edited by using IIS Manager GUI</p>
<p>2.2. Selecting URL paths from physical view of web site &#8211; the paths that are specified for &#8220;Allow&#8221; and &#8220;Disallow&#8221; directives in robots.txt file can be selected from the physical file system layout of your web site.</p>
<p>2.3. Selecting URL paths from virtual view of web site &#8211; the paths that are specified for &#8220;Allow&#8221; and &#8220;Disallow&#8221; directives in robots.txt file can be selected from the logical view of your web site obtained from the results of site analysis.</p>
<ol>
<li>Sitemaps and Sitemap Indexes</li>
</ol>
<p>3.1. User interface for managing sitemap and sitemap indexes files &#8211; the content of the sitemap and indexes files can be edited by using IIS Manager GUI</p>
<p>3.2. Selecting URLs from physical view of web site &#8211; the URLs that are specified within a sitemap can be selected from the physical file system layout of your web site.</p>
<p>3.3. Selecting URLs from virtual view of web site &#8211; the URLs that are specified within a sitemap can be selected from the logical view of your web site obtained from the results of site analysis.</p>
<p><strong><span style="text-decoration: underline;">Rich Internet Application Tools</span></strong></p>
<p><strong><span style="text-decoration: underline;"> </span></strong></p>
<p><strong>Adobe AIR</strong></p>
<p>The Adobe® AIR™ runtime lets <a href="http://www.dhanashree.com/web-development-services/dedicated-php-dotnet-developer" target="_blank">developers</a> use proven <a href="http://www.dhanashree.com/web-development-services" target="_blank">web technologies</a> to build rich <a href="http://www.dhanashree.com/web-development-services/web-software-application-development/supply-chain-management" target="_blank">Internet applications</a> that run outside the browser on multiple operating systems.</p>
<p>Adobe AIR is divided into 3 different categories as per the expertise of particular <a href="http://www.dhanashree.com/web-development-services/dedicated-php-dotnet-developer/dedicated-development-team" target="_blank">developer</a>.</p>
<p>AJAX: <a href="http://www.adobe.com/products/air/develop/ajax/">http://www.adobe.com/products/air/develop/ajax/</a></p>
<p>AIR with Flex : <a href="http://www.adobe.com/products/air/develop/flex/">http://www.adobe.com/products/air/develop/flex/</a></p>
<p>AIR with flash: <a href="http://www.adobe.com/products/air/develop/flash/">http://www.adobe.com/products/air/develop/flash/</a></p>
<p><strong>Google Web toolkit</strong></p>
<p>Google Web Toolkit 1.6 is a unique and remarkable platform-independent Java to JavaScript cross-compiler. The whole application may be written using most of the Java 1.5 features for which there is much tooling and test support. Not only that, but it is also possible to follow the Model View Controller (MVC) approach separating user interface from business logic, reducing cost of maintenance and increasing development flexibility. DOJO, on the other hand, requires you to develop the client using only the JavaScript language. This can be much more time consuming and more difficult to work with<strong> </strong></p>
<p><a href="http://code.google.com/webtoolkit/">http://code.google.com/webtoolkit/</a></p>
<p><strong>jQuery</strong></p>
<p>jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid <a href="http://www.dhanashree.com/dhanashree-web-development-profile" target="_blank">web development</a>. jQuery is designed to change the way that you write JavaScript.</p>
<p><a href="http://jquery.com/">http://jquery.com/</a></p>
<p><strong>Yahoo User Interface</strong></p>
<p>The YUI Library is a set of utilities and controls, written in JavaScript, for building richly <a href="http://www.dhanashree.com/web-development-services/asp-php-web-development/dot-net-web-designing" target="_blank">interactive web applications</a> using techniques such as DOM scripting, DHTML and AJAX</p>
<p><a href="http://developer.yahoo.com/yui/">http://developer.yahoo.com/yui/</a></p>
<p>Apart from these library/toolkits, there are several other toolkits which can also be utilized.</p>
<p>Mootools: <a href="http://mootools.net/">http://mootools.net/</a></p>
<p>Dojo: <cite><a href="http://www.dojotoolkit.org/">www.<strong>dojo</strong>toolkit.org/</a></cite></p>
<p>List of other toolkits: <a href="http://www.javascriptlibraries.com/">http://www.javascriptlibraries.com/</a></p>
<p><strong>Tools for Web Development &amp; Testing</strong></p>
<p>Following are few exiting tools for the <a href="http://www.dhanashree.com/web-development-services/asp-php-web-development/lamp-development-php-web-designing" target="_blank">web development</a> testing.</p>
<ol>
<li>XenoCode Browser SandboxBrowser testing is one of the most tedious and frustrating parts of <a href="http://www.dhanashree.com/web-development-services/asp-php-web-development" target="_blank">web development</a>. What <a href="http://www.dhanashree.com/web-development-services/website-designing/website-designing-services" target="_blank">designer</a> or programmer hasn’t screamed bloody murder at broken alignments in Internet Explorer 6? One of the difficult parts of browser testing is that no developer can have every browser type on a single computer for proper testing.Enter XenoCode Browser Sandbox, a series of virtual applications that can run all popular browsers simultaneously. It does not even require the installation of software. However, XenoCode (Xenocode)’s Browser Sandbox can be heavy in some browsers and is still lacking in a Mac version.Use the following URL for further instruction on how to make use of such toolsRef: <a href="http://www.xenocode.com/browsers/">http://www.xenocode.com/browsers/</a></li>
<li>W3C Validation ServicesW3C is THE standard in all of web validation. The W3C Validator looks into the markup of any website and display errors based on industry standards. It comes in over a dozen languages and a dozen varieties. Here are some of the most important validators:Following are the popular validation services provided by W3C<a href="http://validator.w3.org/" target="_blank">W3C Markup Validation</a><br />
<a href="http://jigsaw.w3.org/css-validator/" target="_blank">W3C CSS Validation</a><br />
<a href="http://validator.w3.org/checklink" target="_blank">W3C Link Checker</a><br />
<a href="http://validator.w3.org/mobile/" target="_blank">W3C mobileOK Checker</a></li>
<li>Javascript &amp; CSS minifyHere is the site which allows you to minify javascript and perhaps the css also<a href="http://www.vlead.in/resources/tools/minify-javascript/index.php">http://www.vlead.in/resources/tools/minify-javascript/index.php</a></li>
</ol>
<p>Following are the list of few articles which can also be referenced for different area of</p>
<p><strong>Web development tools</strong></p>
<p>There are many other tools available over the internet which can be utilized in daily <a href="http://www.dhanashree.com/web-development-services/asp-php-web-development" target="_blank">web development</a>.</p>
<p>Check out following link to improve your productivity</p>
<p><a href="http://mashable.com/2008/11/01/web-development-tools/">http://mashable.com/2008/11/01/web-development-tools/</a></p>
<p><strong>Web 2.0 application &amp; tools</strong></p>
<p><em><a href="http://www.go2web20.net/">http://www.go2web20.net</a></em></p>
<p><span style="text-decoration: underline;"><strong><em><br />
</em></strong></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="color: red;" lang="EN-IN"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><br />
NOTE<span style="mso-spacerun: yes;"> </span>:</span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span lang="EN-IN"><span style="font-size: 11pt; font-family: Calibri;">If you are in need of any </span><a href="http://dhanashree.com/web-development-services/asp-php-web-development" target="_blank"><span style="font-size: 11pt; font-family: Calibri;">Web Development</span></a><span style="font-size: 11pt; font-family: Calibri;"> feel free to <span style="text-decoration: underline;"><a href="http://dhanashree.com/contact-web-designing-company" target="_blank">Inquire us</a></span> .<span style="mso-spacerun: yes;"> </span><span style="text-decoration: underline;"><a href="http://dhanashree.com/" target="_blank">Dhanashree Inc</a></span>. Expertise in <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/asp-php-web-development/dot-net-web-designing" target="_blank">Asp.net Development</a></span>, <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/asp-php-web-development/lamp-development-php-web-designing" target="_blank">Php Development</a></span>,<span style="mso-spacerun: yes;"> </span><span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/website-designing" target="_blank">Website designing</a></span>, <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/open-source-wordpress-joomla-oscommerce-customisation" target="_blank">Open Source customisation</a></span>. <span style="text-decoration: underline;"><a href="http://dhanashree.com/" target="_blank">Dhanashree Inc</a> </span>can be our <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/offshore-website-designing-company" target="_blank">offshore development company</a></span> / </span><a href="http://dhanashree.com/web-designing-outsource-advantages" target="_blank"><span style="font-size: 11pt; font-family: Calibri;">outsourcing</span></a><span style="font-size: 11pt; font-family: Calibri;"> <span style="text-decoration: underline;"><a href="http://dhanashree.com/dhanashree-web-development-profile" target="_blank">web development company</a></span>, <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/dedicated-php-dotnet-developer" target="_blank">hire dedicated web programmers</a></span>.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span lang="EN-IN"><span style="font-size: 11pt; font-family: Calibri;">Above information is for knowledge sharing<span style="mso-spacerun: yes;"> </span>if you have problem / issue / suggestion please intimate us with details for proper and prompt action.</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://techinsight.dhanashree.com/list-of-technology-which-can-be-adopted-into-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Storing and Retrieving image in SQL server 2005 &amp; asp.net using large value data type &amp; HTTP handler</title>
		<link>http://techinsight.dhanashree.com/storing-and-retrieving-image-in-sql-server-2005-asp-net-using-large-value-data-type-http-handler/</link>
		<comments>http://techinsight.dhanashree.com/storing-and-retrieving-image-in-sql-server-2005-asp-net-using-large-value-data-type-http-handler/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 13:51:13 +0000</pubDate>
		<dc:creator>kiran</dc:creator>
				<category><![CDATA[.Net 2.0]]></category>
		<category><![CDATA[C#.net]]></category>
		<category><![CDATA[SQL server 2005]]></category>
		<category><![CDATA[Web Developement]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[.net developement]]></category>
		<category><![CDATA[asp.net developement]]></category>
		<category><![CDATA[SQL server]]></category>

		<guid isPermaLink="false">http://dhanashree.com/techblog/?p=22</guid>
		<description><![CDATA[ASPX page :
&#60;form id=&#8221;form1&#8243; runat=&#8221;server&#8221;&#62;
&#60;div style=&#8221;padding: 200px;&#8221;&#62;
&#60;asp:Image ID=&#8221;imagebox&#8221; runat=&#8221;server&#8221; ImageUrl=&#8221;~/sql-image-store/image-handler.ashx&#8221; /&#62;
&#60;/div&#62;
&#60;/form&#62;
Handler code: image-handler.ashx 
&#60;%@ WebHandler Language=&#8221;C#&#8221; Class=&#8221;image_handler&#8221; %&#62;
using System;
using System.Web;
using System.IO;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Configuration;
public class image_handler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
string xStrCon = System.Configuration.ConfigurationManager.ConnectionStrings["conStrImage"].ConnectionString;
SqlConnection xCon = new SqlConnection(xStrCon);
xCon.Open();
SqlCommand xCom = new SqlCommand(&#8220;select * from images where&#8221;, xCon);
SqlDataAdapter xAda = new SqlDataAdapter(xCom);
DataSet ds = new [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste"><strong><a href="http://www.dhanashree.com/web-development-services/asp-php-web-development/dot-net-web-designing" target="_blank">ASPX</a> page :</strong></div>
<div>&lt;form id=&#8221;form1&#8243; runat=&#8221;server&#8221;&gt;</div>
<div id="_mcePaste">&lt;div style=&#8221;padding: 200px;&#8221;&gt;</div>
<div id="_mcePaste">&lt;asp:Image ID=&#8221;imagebox&#8221; runat=&#8221;server&#8221; ImageUrl=&#8221;~/sql-image-store/image-handler.ashx&#8221; /&gt;</div>
<div id="_mcePaste">&lt;/div&gt;</div>
<div id="_mcePaste">&lt;/form&gt;</div>
<p><strong>Handler code: </strong>image-handler.ashx<strong> </strong></p>
<p>&lt;%@ WebHandler Language=&#8221;C#&#8221; Class=&#8221;image_handler&#8221; %&gt;</p>
<p>using System;</p>
<p>using System.Web;</p>
<p>using System.IO;</p>
<p>using System.Data;</p>
<p>using System.Data.Sql;</p>
<p>using System.Data.SqlClient;</p>
<p>using System.Configuration;</p>
<p>public class image_handler : IHttpHandler</p>
<p>{</p>
<p>public void ProcessRequest(HttpContext context)</p>
<p>{</p>
<p>string xStrCon = System.Configuration.ConfigurationManager.ConnectionStrings["conStrImage"].ConnectionString;</p>
<p>SqlConnection xCon = new SqlConnection(xStrCon);</p>
<p>xCon.Open();</p>
<p>SqlCommand xCom = new SqlCommand(&#8220;select * from images where&#8221;, xCon);</p>
<p>SqlDataAdapter xAda = new SqlDataAdapter(xCom);</p>
<p>DataSet ds = new DataSet();</p>
<p>xAda.Fill(ds);</p>
<p>// Image processing starts</p>
<p>byte[] bytImage = ReadFile(context.Server.MapPath(&#8220;banner.JPG&#8221;));</p>
<p>xCom.CommandText = &#8220;insert into images values(2,&#8217;kensington&#8217;,@imagedata)&#8221;;</p>
<p>xCom.Parameters.Add(new SqlParameter(&#8220;@imagedata&#8221;, (object)bytImage));</p>
<p>xCon.Close();</p>
<p>//Display image from SQL server</p>
<p>byte[] imageData = (byte[])ds.Tables[0].Rows[0][2];</p>
<p>context.Response.Clear();</p>
<p>context.Response.ContentType = &#8220;image/JPEG&#8221;;</p>
<p>context.Response.OutputStream.Write(imageData, 0, imageData.Length);</p>
<p>}</p>
<p>byte[] ReadFile(string sPath)</p>
<p>{</p>
<p>//Initialize byte array with a null value initially.</p>
<p>byte[] data = null;</p>
<p>//Use FileInfo object to get file size.</p>
<p>FileInfo fInfo = new FileInfo(sPath);</p>
<p>long numBytes = fInfo.Length;</p>
<p>//Open FileStream to read file</p>
<p>FileStream fStream = new FileStream(sPath, FileMode.Open, FileAccess.Read);</p>
<p>//Use BinaryReader to read file stream into byte array.</p>
<p>BinaryReader br = new BinaryReader(fStream);</p>
<p>//When you use BinaryReader, you need to supply number of bytes to read from file.</p>
<p>//In this case we want to read entire file. So supplying total number of bytes.</p>
<p>data = br.ReadBytes((int)numBytes);</p>
<p>return data;</p>
<p>}</p>
<p>public bool IsReusable</p>
<p>{</p>
<p>get</p>
<p>{</p>
<p>return false;</p>
<p>}</p>
<p>}</p>
<p>}</p>
<p><span style="text-decoration: underline;"><strong><em><br />
</em></strong></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="color: red;" lang="EN-IN"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><br />
NOTE<span style="mso-spacerun: yes;"> </span>:</span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span lang="EN-IN"><span style="font-size: 11pt; font-family: Calibri;">If you are in need of any </span><a href="http://dhanashree.com/web-development-services/asp-php-web-development" target="_blank"><span style="font-size: 11pt; font-family: Calibri;">Web Development</span></a><span style="font-size: 11pt; font-family: Calibri;"> feel free to <span style="text-decoration: underline;"><a href="http://dhanashree.com/contact-web-designing-company" target="_blank">Inquire us</a></span> .<span style="mso-spacerun: yes;"> </span><span style="text-decoration: underline;"><a href="http://dhanashree.com/" target="_blank">Dhanashree Inc</a></span>. Expertise in <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/asp-php-web-development/dot-net-web-designing" target="_blank">Asp.net Development</a></span>, <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/asp-php-web-development/lamp-development-php-web-designing" target="_blank">Php Development</a></span>,<span style="mso-spacerun: yes;"> </span><span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/website-designing" target="_blank">Website designing</a></span>, <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/open-source-wordpress-joomla-oscommerce-customisation" target="_blank">Open Source customisation</a></span>. <span style="text-decoration: underline;"><a href="http://dhanashree.com/" target="_blank">Dhanashree Inc</a> </span>can be our <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/offshore-website-designing-company" target="_blank">offshore development company</a></span> / </span><a href="http://dhanashree.com/web-designing-outsource-advantages" target="_blank"><span style="font-size: 11pt; font-family: Calibri;">outsourcing</span></a><span style="font-size: 11pt; font-family: Calibri;"> <span style="text-decoration: underline;"><a href="http://dhanashree.com/dhanashree-web-development-profile" target="_blank">web development company</a></span>, <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/dedicated-php-dotnet-developer" target="_blank">hire dedicated web programmers</a></span>.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span lang="EN-IN"><span style="font-size: 11pt; font-family: Calibri;">Above information is for knowledge sharing<span style="mso-spacerun: yes;"> </span>if you have problem / issue / suggestion please intimate us with details for proper and prompt action.</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://techinsight.dhanashree.com/storing-and-retrieving-image-in-sql-server-2005-asp-net-using-large-value-data-type-http-handler/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Developing custom AD rotator control with multiple Image Mapping using C#.net &amp; XML</title>
		<link>http://techinsight.dhanashree.com/developing-custom-ad-rotator-control-with-multiple-image-mapping-using-c-net-xml/</link>
		<comments>http://techinsight.dhanashree.com/developing-custom-ad-rotator-control-with-multiple-image-mapping-using-c-net-xml/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 07:48:24 +0000</pubDate>
		<dc:creator>kiran</dc:creator>
				<category><![CDATA[.Net 2.0]]></category>
		<category><![CDATA[C#.net]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[.net developement]]></category>
		<category><![CDATA[asp.net developement]]></category>
		<category><![CDATA[Web Developement]]></category>

		<guid isPermaLink="false">http://dhanashree.com/techblog/?p=3</guid>
		<description><![CDATA[We are all familiar with AD rotator control asp.net provides to show rotating/random ads on every page refresh.
But I found a limitation of this control while I needed to develop functionality where AD banners get changed on every page refresh as well as each banners should have multiple links which navigates to diff. URLs ( [...]]]></description>
			<content:encoded><![CDATA[<p>We are all familiar with AD rotator control asp.net provides to show rotating/random ads on every page refresh.</p>
<p>But I found a limitation of this control while I needed to develop functionality where AD banners get changed on every page refresh as well as each banners should have multiple links which navigates to diff. URLs ( multiple image mapping in each AD banners )</p>
<p>As this is not possible with AD rotator I have developed a custom asp.net control which provides all this flexibilities with all AD rotator features.</p>
<p><strong>Basic Concept:</strong></p>
<p>To make the control easy to use &amp; understand we will be keeping the concept of defining Ads same like AD rotator control using XML file.</p>
<p>Control will read the Ad banners from the XML file and render all the details with multiple image mappings in the aspx page.</p>
<p><strong>XML file structure: </strong></p>
<p>First and foremost step is to finalize the XML file structure that to be used in custom control to render the ads on random bases.</p>
<p>XML file will look as given in below sample file.</p>
<p><strong>bannes.xml</strong></p>
<p><strong> </strong></p>
<p>&lt;?xml version=”1.0″ encoding=”utf-8″ ?&gt;</p>
<p>&lt;banbers&gt;</p>
<p>&lt;banner&gt;</p>
<p>&lt;ImageUrl&gt;http://xyz.com/banner1.jpg&lt;/ImageUrl&gt;</p>
<p>&lt;AlternateText&gt;Site1 Main&lt;/AlternateText&gt;</p>
<p>&lt;mappings&gt;</p>
<p>&lt;map&gt;</p>
<p>&lt;left&gt;0&lt;/left&gt;</p>
<p>&lt;top&gt;0&lt;/top&gt;</p>
<p>&lt;right&gt;50&lt;/right&gt;</p>
<p>&lt;bottom&gt;50&lt;/bottom&gt;</p>
<p>&lt;navigateUrl&gt;google.com&lt;/navigateUrl&gt;</p>
<p>&lt;/map&gt;</p>
<p>&lt;/mappings&gt;</p>
<p>&lt;/banner&gt;</p>
<p>&lt;banner&gt;</p>
<p>&lt;ImageUrl&gt;banners/5.jpg&lt;/ImageUrl&gt;</p>
<p>&lt;AlternateText&gt;b5&lt;/AlternateText&gt;</p>
<p>&lt;mappings&gt;</p>
<p>&lt;map&gt;</p>
<p>&lt;left&gt;10&lt;/left&gt;</p>
<p>&lt;top&gt;10&lt;/top&gt;</p>
<p>&lt;right&gt;10&lt;/right&gt;</p>
<p>&lt;bottom&gt;10&lt;/bottom&gt;</p>
<p>&lt;navigateUrl&gt;google.com&lt;/navigateUrl&gt;</p>
<p>&lt;/map&gt;</p>
<p>&lt;map&gt;</p>
<p>&lt;left&gt;25&lt;/left&gt;</p>
<p>&lt;top&gt;25&lt;/top&gt;</p>
<p>&lt;right&gt;25&lt;/right&gt;</p>
<p>&lt;bottom&gt;25&lt;/bottom&gt;</p>
<p>&lt;navigateUrl&gt;google.com&lt;/navigateUrl&gt;</p>
<p>&lt;/map&gt;</p>
<p>&lt;map&gt;</p>
<p>&lt;left&gt;10&lt;/left&gt;</p>
<p>&lt;top&gt;10&lt;/top&gt;</p>
<p>&lt;right&gt;10&lt;/right&gt;</p>
<p>&lt;bottom&gt;10&lt;/bottom&gt;</p>
<p>&lt;navigateUrl&gt;google.com&lt;/navigateUrl&gt;</p>
<p>&lt;/map&gt;</p>
<p>&lt;map&gt;</p>
<p>&lt;left&gt;25&lt;/left&gt;</p>
<p>&lt;top&gt;25&lt;/top&gt;</p>
<p>&lt;right&gt;25&lt;/right&gt;</p>
<p>&lt;bottom&gt;25&lt;/bottom&gt;</p>
<p>&lt;navigateUrl&gt;google.com&lt;/navigateUrl&gt;</p>
<p>&lt;/map&gt;</p>
<p>&lt;map&gt;</p>
<p>&lt;left&gt;10&lt;/left&gt;</p>
<p>&lt;top&gt;10&lt;/top&gt;</p>
<p>&lt;right&gt;10&lt;/right&gt;</p>
<p>&lt;bottom&gt;10&lt;/bottom&gt;</p>
<p>&lt;navigateUrl&gt;google.com&lt;/navigateUrl&gt;</p>
<p>&lt;/map&gt;</p>
<p>&lt;map&gt;</p>
<p>&lt;left&gt;25&lt;/left&gt;</p>
<p>&lt;top&gt;25&lt;/top&gt;</p>
<p>&lt;right&gt;25&lt;/right&gt;</p>
<p>&lt;bottom&gt;25&lt;/bottom&gt;</p>
<p>&lt;navigateUrl&gt;google.com&lt;/navigateUrl&gt;</p>
<p>&lt;/map&gt;</p>
<p>&lt;/mappings&gt;</p>
<p>&lt;/banner&gt;</p>
<p>&lt;/banbers&gt;</p>
<p>Inside main <strong>banners</strong> TAG there will be multiple banners TAG to be added for each AD banner,</p>
<p>Each banner TAG will have child nodes(attributes) as listed below:</p>
<ol>
<li>Image URL – AD image URL to be specified here</li>
<li>Alternate text – alt attribute for image</li>
<li>Mappings  &#8211; list of all mappings with relative  <strong>left-right-top-Bottom </strong> attributes
<ol>
<li>Left – left side relative axis</li>
<li>Right – right side relative axis</li>
<li>Top– Top relative axis</li>
<li>Bottom– Bottom relative axis</li>
<li>Navigate URL – URL to navigate</li>
</ol>
</li>
</ol>
<p><strong>Developing Custom Control:</strong></p>
<p>Now next step is to build a custom asp.net control which will read the above XML structure and renders the data accordingly on ASPX page.</p>
<p><strong>C# code file will be as given below: </strong></p>
<p><strong> </strong></p>
<p><strong>ad-banners.cs</strong></p>
<p><strong> </strong></p>
<p>this control will have 1 public property where the XML file path will be given called</p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p>using System;</p>
<p>using System.Collections.Generic;</p>
<p>using System.ComponentModel;</p>
<p>using System.Text;</p>
<p>using System.Web;</p>
<p>using System.Web.UI;</p>
<p>using System.Web.UI.WebControls;</p>
<p>using System.Xml;</p>
<p>namespace InfoquestLibrary.Controls</p>
<p>{</p>
<p>[DefaultProperty("Text")]</p>
<p>[ToolboxData("&lt;{0}:banner runat=server /&gt;")]</p>
<p>public class banner : System.Web.UI.WebControls.WebControl</p>
<p>{</p>
<p>string _strImageURL, _strXMLpath;</p>
<p>[Bindable(true)]</p>
<p>[Category("Appearance")]</p>
<p>[DefaultValue("")]</p>
<p>[Localizable(true)]</p>
<p>public string ImageURL</p>
<p>{</p>
<p>get { return _strImageURL; }</p>
<p>set { _strImageURL = value; }</p>
<p>}</p>
<p>public string XMLpath</p>
<p>{</p>
<p>get { return _strXMLpath; }</p>
<p>set { _strXMLpath = value; }</p>
<p>}</p>
<p>public override void RenderBeginTag(HtmlTextWriter writer)</p>
<p>{</p>
<p>}</p>
<p>public override void RenderEndTag(HtmlTextWriter writer)</p>
<p>{</p>
<p>}</p>
<p>protected override void RenderContents(HtmlTextWriter output)</p>
<p>{</p>
<p>XmlDocument xDoc = new XmlDocument();</p>
<p>XmlNode xRandomNode;</p>
<p>bool useMapping = true;</p>
<p>int xIntRandomNumber;</p>
<p>Random r = new Random();</p>
<p>xDoc.Load(System.Web.HttpContext.Current.Server.MapPath(this.XMLpath));</p>
<p>xIntRandomNumber = r.Next(xDoc.ChildNodes[1].ChildNodes.Count);</p>
<p>xRandomNode = xDoc.ChildNodes[1].ChildNodes[xIntRandomNumber];</p>
<p>if (xRandomNode.ChildNodes[2].Equals(null))</p>
<p>{</p>
<p>useMapping = false;</p>
<p>}</p>
<p>else</p>
<p>{</p>
<p>if (xRandomNode.ChildNodes[2].ChildNodes.Count == 0)</p>
<p>useMapping = false;</p>
<p>}</p>
<p>if (xRandomNode.HasChildNodes)</p>
<p>{</p>
<p>this.ImageURL = xRandomNode.ChildNodes[0].InnerText;</p>
<p>}</p>
<p>output.AddAttribute(HtmlTextWriterAttribute.Src, this.ImageURL);</p>
<p>if (useMapping)</p>
<p>{</p>
<p>output.AddAttribute(HtmlTextWriterAttribute.Usemap, “#map” + this.ID);</p>
<p>}</p>
<p>output.AddAttribute(HtmlTextWriterAttribute.Border, “none”);</p>
<p>this.AddAttributesToRender(output);</p>
<p>output.RenderBeginTag(HtmlTextWriterTag.Img);</p>
<p>if (useMapping)</p>
<p>{</p>
<p>int xIntMaps, xIntCounter;</p>
<p>xIntMaps = xRandomNode.ChildNodes[2].ChildNodes.Count;</p>
<p>output.AddAttribute(HtmlTextWriterAttribute.Name, “map” + this.ID);</p>
<p>output.AddAttribute(HtmlTextWriterAttribute.Id, “map” + this.ID);</p>
<p>this.AddAttributesToRender(output);</p>
<p>output.RenderBeginTag(HtmlTextWriterTag.Map);</p>
<p>for (xIntCounter = 0; xIntCounter &lt; xIntMaps; xIntCounter++)</p>
<p>{</p>
<p>XmlNode xMap = xRandomNode.ChildNodes[2].ChildNodes[xIntCounter];</p>
<p>if (xMap.HasChildNodes)</p>
<p>{</p>
<p>output.AddAttribute(HtmlTextWriterAttribute.Shape, “rect”);</p>
<p>output.AddAttribute(HtmlTextWriterAttribute.Coords, xMap.ChildNodes[0].InnerText + “,” + xMap.ChildNodes[1].InnerText + “,” + xMap.ChildNodes[2].InnerText + “,” + xMap.ChildNodes[3].InnerText);</p>
<p>output.AddAttribute(HtmlTextWriterAttribute.Href, xMap.ChildNodes[4].InnerText);</p>
<p>output.AddAttribute(HtmlTextWriterAttribute.Title, “”);</p>
<p>output.AddAttribute(HtmlTextWriterAttribute.Alt, “”);</p>
<p>output.RenderBeginTag(HtmlTextWriterTag.Area);</p>
<p>output.RenderEndTag();</p>
<p>}</p>
<p>}</p>
<p>output.RenderEndTag();</p>
<p>}</p>
<p>}</p>
<p>protected override void OnPreRender(EventArgs e)</p>
<p>{</p>
<p>}</p>
<p>}</p>
<p>}</p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong>Using customer control in ASPX page:</strong></p>
<p><strong> </strong></p>
<p>Now we are done with developing customer control with all the required functionality.</p>
<p>And control now ready for use.</p>
<p><strong><em>Registering custom control</em></strong></p>
<p><strong><em> </em></strong></p>
<p>&lt;%@ Register Assembly=”code_center_library” TagPrefix=”TCC” Namespace=”TCC.Controls” %&gt;</p>
<p><strong><em>Defining Custom control in ASPX page</em></strong></p>
<p><strong><em> </em></strong></p>
<p>&lt;TCC:banner ID=”ads” runat=”server” XMLpath=”~/banner-mapping/bannes.xml” /&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://techinsight.dhanashree.com/developing-custom-ad-rotator-control-with-multiple-image-mapping-using-c-net-xml/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

