Friday, May 15, 2009
Thursday, May 14, 2009
coding for creating video file as ur own using SMIL Concept
use above coding to perform the task.
Before Getting into Coding, try to know abt this smil coding.
This coding run only in Apple's Quicktime player, Windows Media Player, and RealNetworks RealPlayer support SMIL.
Before You run this code, install one of the above software.
Save the file with the extension filename.smil
Run the program thru players mention above
Wednesday, April 22, 2009
Coding for Export Gridview Data into Excel format
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=C:\\temp\\vijay.xls");//if u want to Export into Document replace vijay.xls with vijay.doc
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vijay.xls";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
GridView1.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();
Note:
This method is used to Perform the rendercontrol event.
Add the below function with the coding
public override void VerifyRenderingInServerForm(Control control)
{
}
Response.AddHeader("content-disposition", "attachment;filename=C:\\temp\\vijay.xls");//if u want to Export into Document replace vijay.xls with vijay.doc
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vijay.xls";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
GridView1.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();
Note:
This method is used to Perform the rendercontrol event.
Add the below function with the coding
public override void VerifyRenderingInServerForm(Control control)
{
}
Thursday, March 26, 2009
Coding for changing Image display while Hover using Jquery
$(function() {
$('#div_menu a').animate({"opacity": .7 });
$('#div_menu a').hover(function() {
$(this).stop().animate({ "opacity": 3 });
},
function() {
$(this).stop().animate({ "opacity": .5 });
});
});
$(function() {
$('#div_tools img').animate({"opacity": .5 });
$('#div_tools img').hover(function() {
$(this).stop().animate({ "opacity": 1 });
},
function() {
$(this).stop().animate({ "opacity": .5 });
});
});
$('#div_menu a').animate({"opacity": .7 });
$('#div_menu a').hover(function() {
$(this).stop().animate({ "opacity": 3 });
},
function() {
$(this).stop().animate({ "opacity": .5 });
});
});
$(function() {
$('#div_tools img').animate({"opacity": .5 });
$('#div_tools img').hover(function() {
$(this).stop().animate({ "opacity": 1 });
},
function() {
$(this).stop().animate({ "opacity": .5 });
});
});
Coding for open a document file using javascript
Note: Works in IE only
var fso=new ActiveXObject("Word.Application");
fso.Documents.Open(open_path);
fso.Visible=true;
fso.close();
var fso=new ActiveXObject("Word.Application");
fso.Documents.Open(open_path);
fso.Visible=true;
fso.close();
coding for reading text from file in javascript
note: It works only in IE
var fso = new ActiveXObject("Scripting.FileSystemObject");
var folderObj = fso.GetFolder("C:\\ctsi\\profile");
var fsoo=new Enumerator(folderObj.Files);
for(i=0;!fsoo.atEnd();fsoo.moveNext())
{
var filename=fsoo.item().name;
}
var fso = new ActiveXObject("Scripting.FileSystemObject");
var folderObj = fso.GetFolder("C:\\ctsi\\profile");
var fsoo=new Enumerator(folderObj.Files);
for(i=0;!fsoo.atEnd();fsoo.moveNext())
{
var filename=fsoo.item().name;
}
Tuesday, March 24, 2009
coding for Banner Animation in Jquery
imgc=1;
timer="";
$(document).ready(function(){
});
function image()
{
if($("#slideshow").html()!="Stop")
{
$("#slideshow").html("Stop");
timer=window.setInterval("slideshow()",3000);
}
else
{
$("#slideshow").html("Slideshow");
window.clearInterval(timer);
}
}
function slideshow()
{
if(imgc<11)
{
$("#img").fadeOut({complete:function(){$(this).attr("src","./images/image"+imgc+".jpg").fadeIn();}});
imgc++;
}
else
{
imgc=1;
$("#img").fadeOut({complete:function(){$(this).attr("src","./images/image"+imgc+".jpg").fadeIn();}});
}
}
timer="";
$(document).ready(function(){
});
function image()
{
if($("#slideshow").html()!="Stop")
{
$("#slideshow").html("Stop");
timer=window.setInterval("slideshow()",3000);
}
else
{
$("#slideshow").html("Slideshow");
window.clearInterval(timer);
}
}
function slideshow()
{
if(imgc<11)
{
$("#img").fadeOut({complete:function(){$(this).attr("src","./images/image"+imgc+".jpg").fadeIn();}});
imgc++;
}
else
{
imgc=1;
$("#img").fadeOut({complete:function(){$(this).attr("src","./images/image"+imgc+".jpg").fadeIn();}});
}
}
Thursday, March 5, 2009
Accessing Tables from AS400 using C#.Net
For accessing IBM namespace.Add reference of IBM DB2 UDB for iSeries .Net Provider from Add Reference Window.
using IBM.Data.DB2.iSeries;
iDB2Connection connection_string = new iDB2Connection("DataSource=server_name;UserId=user_name;Password=password");
string select_query="select * from sample";
connection_string.Open();
iDB2DataAdapter Data_Adapter = new iDB2DataAdapter(select_query,connection_string);
DataSet Data_set = new DataSet();
Data_Adapter.Fill(Data_set);
GridView2.DataSource = Data_set;
GridView2.DataBind();
using IBM.Data.DB2.iSeries;
iDB2Connection connection_string = new iDB2Connection("DataSource=server_name;UserId=user_name;Password=password");
string select_query="select * from sample";
connection_string.Open();
iDB2DataAdapter Data_Adapter = new iDB2DataAdapter(select_query,connection_string);
DataSet Data_set = new DataSet();
Data_Adapter.Fill(Data_set);
GridView2.DataSource = Data_set;
GridView2.DataBind();
Subscribe to:
Posts (Atom)