EDUDOTNET

Thursday, September 12, 2013

How To Convert HTML Table In To Div Tag

Using Jquery Convert HTML Table in to Div tag:

Jquery function converting table in to div, see below jquery function:
<script type="text/javascript">
        $('table').replaceWith(function () {
            var html = ''; 
            $('tr'this).each(function () {
                html += '<div>';
                $('td'this).each(function () {
                    html += '<div>' + $(this).html() + '</div>';
                });
                html += '</div>';
            }); 
            return '<div>' + html + '</div>';
        });
</script>
Table :
<table>
        <tr>
            <td width="180" valign="top" id="maintable-toc">
                <div id="toc">
                    <h2>
                        <a id="toc-title" href="index.htm">Table of Contents</a></h2>
                    <ol class="section">
                        <li>
                            <div class="currentpage">
                                Basics</div>
                            <ol>
                                <li><a href="page_02.htm">Pages </a></li>
                                <li><a href="page_03.htm">Sections </a></li>
                                <li><a href="page_04.htm">Headings </a></li>
                            </ol>
                        </li>
                        <li><a href="page_07.htm">Images </a></li>
                    </ol>
                </div>
            </td>
            <td width="*" valign="top" id="maintable-content">
                <div id="main-content-withtoc">
                    <a name="Main"></a>
                    <h2>
                        Basics</h2>
                    <p>This section looks at the basics of work.</p>
                </div>
            </td>
        </tr>
</table>




Friday, September 6, 2013

How to create sql query result to xml file

Create Sql Query Result To XML Format

Sql Query: Getting all users data from sql server in xml file format...

See below Query:

SELECT *
FROM dbo.Users
FOR XML PATH('User'), ROOT ('Users')

Results: (XML Format):

<Users>
  <User>
    <UserID>8eaf6426-63e4-49c7-939e-1b0f43586084</UserID>
    <RoleID>4</RoleID>
    <FirstName>Thomas</FirstName>
    <LastName>Dalm</LastName>
    <Password>iJletJwlcqUrAIC98rggvA==</Password>
    <EmailID>thomas.edu@gmail.com</EmailID>
    <CreatedDate>2013-05-29T06:39:48.217</CreatedDate>
    <IsActive>1</IsActive>
    <CompanyName>EDUDOTNET</CompanyName>
    <LastPasswordChangedDate>2013-07-1T08:31:14.150</LastPasswordChangedDate
  </User>
  <User>
    <UserID>1e922995-d0f9-e211-b767-3c4a92dbc8db</UserID>
    <RoleID>1</RoleID>
    <FirstName>Khumesh</FirstName>
    <LastName>Kumawat</LastName>
    <Password>iJletJwlcqUrAIC98rggvA==</Password>
    <EmailID>khumesh.edu@gmail.com</EmailID>
    <CreatedDate>2013-05-29T06:39:48.217</CreatedDate>
    <IsActive>1</IsActive>
    <CompanyName>EDUDOTNET</CompanyName>
    <LastPasswordChangedDate>2013-07-1T08:31:14.150</LastPasswordChangedDate>
  </User

</Users>

Tuesday, August 27, 2013

Dynamically Get/Add Web Page Title And Meta Tags Using C#

How To Get Web Page Title And Meta Tags By URL Using C#?
How To Add Dynamic Meta Tags Using C#?

We can get web page title and meta tags using c# by web url and also can add dynamic meta tags. We need to add "HtmlAgilityPack" for parse HTML document in c#.

Add Namespaces

using System.Text.RegularExpressions;
using System.Web.Script.Serialization;
using System.Web.UI.HtmlControls;
using HtmlAgilityPack;


Create Class And Function


Create Function For Getting Meta Tags

Add And Calling Functions

Get Results


Saturday, August 3, 2013

Exception: "Object reference not set to an instance of an object”

What do you mean by "Object reference not set to an instance of an object”?

Approximate every day, C# programmers getting this type of error and ask:
Why do I get the error "Object reference not set to an instance of an object"?
The program is trying to access a member of a reference type variable which is set to null that is a main reason getting type of exceptions.
In the Main method, notice that edudotnet is set to null. Therefore, the following code will throw a NullReferenceException:
Since edudotnet is null, it has no members to be accessed. Whereas the preceding example used a roperty call, the following example source code uses a method call:

The preceding code will throw a NullReferenceException; because, edudotnet is still null. It is irrelevant that the first example call was a property and the second was a method: they are both members of the type.  
To solve this edudotnet, be sure the edudotnet object is instantiated before being referenced.The following samplesource code instantiates edudotnet and, so, avoids the error message:Now, edudotnet contains a reference to an instance of EDUDOTNET; so, any of its members can be called.

Thursday, August 1, 2013

Get Element XPath of Selected Element Of IFrame Using Jquery

How To Get Element XPath of Selected Element Of IFrame Using Jquery

XPath

This a query language that can be used to select arbitrary parts of HTML documents in ability.
XPath is a language that describes a way to locate and process items in HTML And XML documents by using an addressing syntax based on a path through the document's logical structure or hierarchy.

Get  XPath of Selected Element Of IFrame Using Jquery

If you want to get element`s XPath of selected element of Iframe and also add highlight css in element on mouseover , out and click event.
     1.    Create Project
     2.  Add an Iframe page
a.       -Add required contents & element
b.      Add reference of “Highlight” css file under the page head.
     3.  Add Iframe parent page
a.       Add Iframe
b.  Add required content and element.
c.  Add jquery-1.4.1.js or latest js file under head section    
d.      Create Jquery code and function for this functionality.
e.      Add document.ready function.
f.        Create function get element`s XPath.


Highlight CSS (highlight.css)



IFrame Page(Iframe.htm)

Main Page (Parent Page-Index)
Jquery Code 
Sample Screenshots
- Highlight-on-mouseover

-Get XPath On Click In Alert()

Tuesday, July 16, 2013

Easy To Use nopCommerce Open Source For Shopping Cart



nopCommerce is an open source e-commerce solution that contains both a catalog front-end and an administration tool back-end. nopCommerce is a fully customizable shopping cart. It's stable and highly usable.

nopCommerce is a popular open source e-commerce solution built on the top of latest ASP.Net MVC 4.0 with MS SQL 2005 or higher as database back-end. It has all the features that any modern e-commerce site will need.

Compared to other open source e-commerce solutions, nopCommerce’s project structure is very well-organized and easier to customize and extend. It is extremely powerful and flexible yet very easy to use. (Source from nopCommerce )

nopCommerce 3.0 Multi-Store and Multi-Vendor

nopCommerce 3.0 will be the only fully open-source e-commerce platform that support multi-store and multi-vendor features.

Major Features of nopCommerce 3.0
  • Multi-Store Support
  • Multi-Vendor Support
  • Performance Optimization
  • Search Engine Optimization
  • HTML & CSS Refactoring
Sample Screenshot


nopCommerce website url:  http://www.nopcommerce.com/default.aspx
nopCommerce download link: http://www.nopcommerce.com/downloads.aspx
                                              http://nopcommerce.codeplex.com/

nopCommerce store & admin demo: http://demo.nopcommerce.com/ 
                                                        http://admin-demo.nopcommerce.com/admin/



Thursday, June 27, 2013

Visual Studio 2013 Preview Highlights

Amazing apps start with Visual Studio 2013 

Get Visual Studio 2013 Preview to try the tools and services you need to create amazing apps that will exceed everyone's expectations.

Visual Studio 2013 Preview Highlights


1. Open VS 13 first time - follow bellow steps....
a.


b. Choose your default environment and VS color theme























c. Preparing VS for first time





















d. looks like below after open












2. Create New Project VS 13 Pre

a. Open VS 13 & Click on "New Project" under Start section in left pane














b. After that open a dialog box & select a project type (Web/Windows etc.) and select project location and write project name than click on OK button















c. After that open a dialog box & select a template for ASP.Net Project and set "Configure Authentication" & Click on "Create Project" button.
















d. Created New Project with VS 13 and you can see solution explorer.....














e. Run you application its looking pretty good with new theme using bootstrap lib....














                    ~Enjoying with VS 2013 Preview~