Sunday, 10 November 2013

How can we delete duplicate duplicate information in sql server

DELETE
FROM  sheet1$
WHERE sheet1$.%%lockres%%
      NOT IN (SELECT MIN(b.%%lockres%%)
              FROM   sheet1$ b
              GROUP BY b.candidatecode, b.candidatename, b.currentyrsem, b.stream, b.streamsubject, b.subject, b.subjectcode, b.subjecttype, b.theorymarks, b.iamarks, b.theoryminmarks, b.theorymaxmarks, b.iaminmarks, b.iamaxmarks, b.credits, b.centername, b.result, b.collaboratorname)
             

Sheet1$ is a table name and candidatecode, candidatename, currentrysem, stream and all are the coloumn name of table......

Tuesday, 9 July 2013

How can we play .mp3 songs in asp.net


<object width="600" height="400">
            <param name="Music1" value="MusicFileName">
            <embed src="20 Haavan Mix - Kenny G.mp3" width="600" height="500" loop="true">
            </embed>
        </object>


I hope this code will help you...

Monday, 1 October 2012

How can we convert text to voice in asp.net

Use these namespaces:-

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SpeechLib;
 
Follow the step to add library reference:- 
Add Reference-----> 
COM---> MicrosoftSpeechObjectLibrary (Add this reference).
 
 

Friday, 28 September 2012

Attractive drop down menu using css

Write Down The Code

    <div id="content-wrapper">
  <ul id="hb-menu">
<li><a href="#">Home</a></li>
<li>
<a href="#">Categories</a>
<ul>
<li><a href="#">CSS</a></li>
<li><a href="#">Graphic design</a><ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
<li><a href="#">Link 4</a></li>
</ul>   </li>

Thursday, 27 September 2012

how can we upload and download file in asp.net

Code of upload/insert data in database:- 
 
protected void imgSubmit_Click(object sender, ImageClickEventArgs e)
    {
        SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["con"].ToString());
        SqlCommand cmd = new SqlCommand("application", con);
        cmd.Connection = con;
        cmd.CommandType = CommandType.StoredProcedure;

        if (filephoto.HasFile && filedoc1.HasFile && filedoc2.HasFile && filedoc3.HasFile)
        {
            string fileExt = System.IO.Path.GetExtension(filephoto.FileName);

Friday, 21 September 2012

How can we validate .doc,.docx file using javascript

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
<script type="text/javascript" language="javascript">
function validate() {
var uploadcontrol = document.getElementById('<%=FileUpload3.ClientID%>').value;
//Regular Expression for fileupload control.
var reg = /^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.doc|.docx|.DOC|.DOCX)$/;
if (uploadcontrol.length > 0)
{
//Checks with the control value.
if (reg.test(uploadcontrol))
{
return true;
}

Saturday, 8 September 2012

How can we select all check box in one click using javascript

<HeaderTemplate>
  <input id="chkAll"  
onclick="javascript:SelectchooseAllCheckboxes(this);" 
              runat="server" type="checkbox" />
</HeaderTemplate>