A Place to Learn Ur-self…


Originally posted on Journey to SQL Authority with Pinal Dave:

Note: If you want to practice the code and the example along with here, you can download dbForget Studio from here.

Everyone, who is involved in work with databases, eventually faces with data export/import tasks. Unlike data import tasks, data export has to be performed in various formats, depending on the business requirements of customers. SSMS capabilities allow saving selection result in the CSV format or as a text file with delimiters. Moreover, SQL Server supports the OPENROWSET construct, which usage enables export to XLS files. However, this functionality was scarcely enough for me to perform current tasks. In order to resolve the situation and meet customers’ requirements, I had to automate the export process using dynamic SQL.

At first, such an approach justified itself. For example, here is an HTML markup generating script for a random table/view:

USE AdventureWorks2012;
DECLARE
@object_name SYSNAME
, @object_id INT
, @record_count INT
,

View original 599 more words


Originally posted on Justin Cooney:

Have you ever wanted to help your users move data from Excel to your Web application? In this article I will give an example in ASP.NET that takes copied Excel spreadsheet rows from the user’s clipboard and saves the information to a SQL Server database table.

Since ASP.NET runs at the server level, you will need to use JavaScript/JQuery to get the Excel information from the user’s clipboard. You will need to use a different command to get the information depending on the user’s browser. In this example, I code specifically for Internet Explorer, but this is just since I am giving an example. In a real-world application you would code for all of the major browsers.

View original 839 more words


If you are working with files in asp.net it is better to Store the files on the file system and filepath in the database. In many situations, databases are stored on fast (read: expensive storage, 15k RPM or SSD drives) storage. Images or other files, typically can be stored on slower (read: cheaper, larger drives, 7.2k RPM drives) storage.

Because…

  1. You can access files faster
  2. easier to configure security settings
  3. No size limitation
  4. You will be able to serve the pictures as static files.
  5. No database access or application code will be required to fetch the pictures.
  6. The images could be served from a different server to improve performance.
  7. you don’t get into any trouble, if you have to migrate your back end.
  8. It will reduce database bottleneck.
  9. The database ultimately stores its data on the file system.
  10. Images can be easily cached when stored on the file system.

still if you want to store files in DataBase only, better to use FileStream field type which can provide the best of both worlds.


SANTOSH TECHNOLOGIES is an Elite software training organization, in the heart of Hyderabad. Trainers here are beholder of true spirit of this novel profession of sharing the knowledge. All of them are highly experienced in designing/development of software solutions in their respective domains. Training sessions, here are more focused on interaction with the trainee rather than only teaching them. This motivates them to develop and share their views with each other. We encourage all our trainees to think innovative; hence they become technically skilled before entering into any company/project implementation.

Now is the era of people who possess unique and innovative thoughts. Our unique approach of training excites all our trainees to learn and understand various software design and development skills along with the routine courses provided here. These days, all the companies are hunting for the people with this motive. Students trained by us, made us proud in joining some of the prestigious software companies like Oracle, Wipro, Pramati Technologies, Mahindra Satyam, TCS, HCL. We invite you to be a part of our knowledge sharing culture.

It is no big deal to go through any kind of technical interviews after being trained by us. We build the confidence & knowledge within our trainees. This also helps them to surface with success in this highly competitive world. One can feel the difference from the very beginning of our training session. All it needs a thoughtful attention in our sessions.

We believe in the words of Swami Vivekananda i.e. ‘I will only be too glad if I can excite in you the power of thinking for yourselves’. And we implement the same thought in our technical training sessions. This makes our students well efficient to grab any contemporary technologies and at the same time, analyzing/resolving various technical issues.

We even believe in the approach “Know the requirement and then find its solution”. This approach of us helps our trainees to analyze and implement the requirement in a desirable manner.

SantoshTechnologies


Deveopers Fusion is a place where the professionals can share their experience and views contributing knowledge to the developer’s community. A successful professional, learns, explores, matures and finally contributes.

The developersfusion.com works with an idea, that has a big vision of bringing Technology to the cozy of your room wherever you are, and make learning comprehensive and exploring Technology real simple and easy.

We are dedicated in providing our Readers quality implementation, education, documentation and solutions. Our ultimate goal is to provide our readers with appropriate solution to their technical questions and needs. The developersfusion.com personifies the passion for Software Technology, delivers power in the technology and the skills associated with it, and enhances the productivity of professionals who shape the software field.

The developersfusion.com believes that it is vital to make learning Technology easy and effective and help its readers, technical breakthroughs in their future career along with other sessions that make them more informed about things that happen around them.

The Articles section lists articles published from different professionals enabling our readers to learn what’s new in the market and also the experience of the author. The FAQs section enables readers to prepare for answering the interview questions shot at them.

If you have any concern or suggestions, please feel free to post your valuable comments to admin@developersfusion.com. We assure you that we would come back to you with proper answers at the earliest possible.

DevelopersFusion.com


Subject: Here we can Learn how to Handle Double click event of Asp.Net controls using Jquery, here i will explain with asp.net button control

If you are New to Jquery Start from here.

first take new asp.net empty website and add jquery library to website and add one asp.net webform and write following code

JQuery Script:

<script type="text/javascript">
        $(function () {
            $("input[id$=Button1]").bind({
                click: function (e) {
                    e.preventDefault();
                },
                dblclick: function () {
                    alert("DoubleClick Happed to Button");
                }
            });
        });
    </script>

CompleteCode:

<%@ Page Title="Handling DoubleClick of Asp.Net Button" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="HandlingDoubleClick.aspx.cs" Inherits="HandlingDoubleClick" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script src="Scripts/jquery-1.7.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("input[id$=Button1]").bind({
                click: function (e) {
                    e.preventDefault();
                },
                dblclick: function () {
                    alert("DoubleClick Happed to Button");
                    //write ur code here
                }
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:Button ID="Button1" runat="server" Text="Double click on me" />
</asp:Content>

Explanation:

Here i am explaining Example with Master pages, the reason is, when the asp.net webform renders as html in browser it will assign dynamic ids for asp.net controls while merging master page and content page. Here why asp.net assigning dynamic ids, because to avoid naming collision

so here we have to use

$("input[id$=Button1]")

this statement to get asp.net control with dynamic id

and Bind method will bind events to control, here we are binding click and double click events

Click Event:

click: function (e) {
                    e.preventDefault();
                },

in this click event we are preventing default behavior of asp.net button control, i.e preventing post back

Double click Event:

dblclick: function () {
                    alert("DoubleClick Happed to Button");
                    //write ur code here
                }

in this double click event write your code…

 

Happy Coding….

If u have any drought feel free to contact from AboutMe page


Here we can learn how to expand or collapse a panel when user check or uncheck the checkbox using JQuery with asp.net

if you are very new to Jquery start from here.

Take a new website and add one webform(file—> new –> website—> asp.net Empty website—> enter website name—> press Ok—> add one webform to root directory)

then add our JQuery library file to the website as shown below

JQueryScripts

add that jquery-1.7.js file to webform and write following code

JQuery Script:

<script type="text/javascript">
        $(function () {
            $("input[id$=chkCollapseExpand]").click(function () {
                if ($(this).attr("checked")) {
                    $("div[id$=pnlCollapsable]").slideDown('slow');
                }
                else {
                    $("div[id$=pnlCollapsable]").slideUp('slow');
                }
            });
        });
    </script>

Total Code:

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script src="Scripts/jquery-1.7.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("input[id$=chkCollapseExpand]").click(function () {
                if ($(this).attr("checked")) {
                    $("div[id$=pnlCollapsable]").slideDown('slow');
                }
                else {
                    $("div[id$=pnlCollapsable]").slideUp('slow');
                }
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:CheckBox ID="chkCollapseExpand" runat="server" Text="Show/Hide" />
    <asp:Panel ID="pnlCollapsable" runat="server" Width="400" BackColor="#FF99FF" BorderColor="Fuchsia" BorderWidth="5" Font-Size="X-Large" EnableViewState="True" style="display:none;">
        This is Jquery example for expand and collapse when user clicks on checkbox from http://chikkanti.wordpress.com
    </asp:Panel>
</asp:Content>

Explanation:

$("input[id$=chkCollapseExpand]")

Reading Checkbox Control of type input

$(this).attr("checked")

checking weather check box is checked or not by reading checked attribute

$("div[id$=pnlCollapsable]").slideDown('slow');

reading panel and expanding by calling slideDown method

slow will add little animation to panel while expanding

$("div[id$=pnlCollapsable]").slideUp('slow');

reading panel and Collapsing by calling slideUp method

slow will add little animation to panel while Collapsing

 

OutPut:

Hide Show

=====================================

Happy Coding………..