Click here to Skip to main content
15,897,226 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionCACHING IN ASP.NET Pin
member2719-Feb-09 23:04
member2719-Feb-09 23:04 
AnswerRe: CACHING IN ASP.NET Pin
ToddHileHoffer20-Feb-09 4:40
ToddHileHoffer20-Feb-09 4:40 
QuestionPerformance of webpage Pin
farogh haider19-Feb-09 23:03
farogh haider19-Feb-09 23:03 
AnswerRe: Performance of webpage Pin
Brij19-Feb-09 23:28
mentorBrij19-Feb-09 23:28 
AnswerRe: Performance of webpage Pin
Satish3220-Feb-09 0:43
Satish3220-Feb-09 0:43 
AnswerRe: Performance of webpage Pin
Xmen Real 20-Feb-09 17:45
professional Xmen Real 20-Feb-09 17:45 
Questionhow to populate grid view with list of files. [modified] Pin
aashish.saalvi19-Feb-09 22:46
aashish.saalvi19-Feb-09 22:46 
AnswerRe: how to populate grid view with list of files. [modified] Pin
rakeshs31219-Feb-09 23:37
rakeshs31219-Feb-09 23:37 
Make the gridview field that the file name appears as a template field and try to get the path first.If u r storing all the files in one palce or folder means it is easy to get the path.First get the cell value and then append the path,here i am giving one eg it may help u(U have only the reference of the file in the dataGrid)
here i am getting the cell value from the grid and appending with the path and then giving to play in a player

aspx page

]]>





<title>Untitled Page

window.moveTo(0, 0);
window.resizeTo(screen.width, screen.height)
function PlayIt(a)
{
var what='C:\\rakesh\\Music\\AnanthaBhadram\\Music\\'+a;

document.getElementById('music').innerHTML='<object width="300px" height="60px" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">'
+'<param name="url" value="'+what+'" />'
+'<param name="uiMode" value="full" />'
+'<param name="autoStart" value="true" />'
+'<param name="loop" value="true" />'
+'<embed type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" showcontrols="true" uimode="full" width="300px" height="60px" src="'+what+'" autostart="true" loop="true">'+'</embed></object>';
return false;
}
function right(e)
{
if (navigator.appName == 'Netscape' &&(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3))
{
alert("Sorry, you do not have permission to right click.");
return false;
}
return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;



function abc(a)
{
var what="C:\\rakesh\\Music\\AnanthaBhadram\\"+a;
alert(what);
}











<object height="55" width="249" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" style="z-index: 100; left: 302px; position: absolute; top: 98px">
<param name="URL" value="" />
<param name="rate" value="1" />
<param name="balance" value="0" />
<param name="currentPosition" value="0" />
<param name="defaultFrame" value="" />
<param name="playCount" value="1" />
<param name="autoStart" value="-1" />
<param name="currentMarker" value="0" />
<param name="invokeURLs" value="-1" />
<param name="baseURL" value="" />
<param name="volume" value="50" />
<param name="mute" value="0" />
<param name="uiMode" value="full" />
<param name="stretchToFit" value="-1" />
<param name="windowlessVideo" value="-1" />
<param name="enabled" value="-1" />
<param name="enableContextMenu" value="-1" />
<param name="fullScreen" value="0" />
<param name="SAMIStyle" value="" />
<param name="SAMILang" value="" />
<param name="SAMIFilename" value="" />
<param name="captioningID" value="" />
<param name="enableErrorDialogs" value="-1" />
<param name="_cx" value="6588" />
<param name="_cy" value="1455" />

 

<asp:gridview id="GridView1" runat="server" autogeneratecolumns="False" datasourceid="SqlDataSource1" onrowdatabound="GridView1_RowDataBound" xmlns:asp="#unknown">
Style="z-index: 102; left: 305px; position: absolute; top: 206px">
<columns> <asp:templatefield headertext="No" insertvisible="False" sortexpression="No">
<edititemtemplate>
<asp:label id="Label1" runat="server" text="<%# Eval(" no=") %>">

<itemtemplate>
<asp:label id="Label1" runat="server" text="<%# Eval(" no=") %>">


<asp:templatefield headertext="Music_Path" sortexpression="Music_Path">

<itemtemplate>
<asp:linkbutton id="LinkButton2" runat="server" text="<%# Eval(" music_path=") %>" commandargument="<%# Eval(">LinkButton



<asp:templatefield headertext="Name" sortexpression="Name">
<itemtemplate>
<asp:linkbutton id="LinkButton1" runat="server" text="<%# Bind(" name=") %>" commandargument="<%# Eval(">



<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="Data Source=ONAM;Initial Catalog=Rakesh;User ID=sa" xmlns:asp="#unknown">
ProviderName="System.Data.SqlClient" SelectCommand="SELECT [No], [Music_Path], [Name] FROM [Music]">











cs file


using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void GridView1_RowDataBound(object sender,GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton l = (LinkButton)e.Row.FindControl("LinkButton1");
l.Attributes.Add("onclick", "return PlayIt('" + l.CommandArgument + "') " );

}
}
}

modified on Friday, February 20, 2009 5:55 AM

AnswerRe: how to populate grid view with list of files. Pin
Member 43782053-Mar-09 7:07
Member 43782053-Mar-09 7:07 
QuestionHow To Store File Path In Access Databse in ASP.net using C# Pin
aashish.saalvi19-Feb-09 22:23
aashish.saalvi19-Feb-09 22:23 
AnswerRe: How To Store File Path In Access Databse in ASP.net using C# Pin
Vimalsoft(Pty) Ltd19-Feb-09 22:34
professionalVimalsoft(Pty) Ltd19-Feb-09 22:34 
AnswerRe: How To Store File Path In Access Databse in ASP.net using C# Pin
farogh haider19-Feb-09 23:13
farogh haider19-Feb-09 23:13 
AnswerRe: How To Store File Path In Access Databse in ASP.net using C# [modified] Pin
rakeshs31219-Feb-09 23:40
rakeshs31219-Feb-09 23:40 
QuestionDoes dll developed using Framework 3.5 will work in Framework 2.0 server Pin
Exelioindia19-Feb-09 22:10
Exelioindia19-Feb-09 22:10 
AnswerRe: Does dll developed using Framework 3.5 will work in Framework 2.0 server Pin
Christian Graus19-Feb-09 22:17
protectorChristian Graus19-Feb-09 22:17 
Questionhow to generate the dynamic menu in front end.(sequence and page hiearachy pass by the adminstrator) Pin
keyur satyadev19-Feb-09 21:57
keyur satyadev19-Feb-09 21:57 
QuestionValidation of viewstate MAC failed Pin
NidhiKanu19-Feb-09 21:34
professionalNidhiKanu19-Feb-09 21:34 
AnswerRe: Validation of viewstate MAC failed Pin
Pratik Vasant Shah20-Feb-09 1:31
Pratik Vasant Shah20-Feb-09 1:31 
GeneralRe: Validation of viewstate MAC failed Pin
NidhiKanu20-Feb-09 1:50
professionalNidhiKanu20-Feb-09 1:50 
QuestionComma Separated Value Pin
krishna2gubbala19-Feb-09 21:32
krishna2gubbala19-Feb-09 21:32 
AnswerRe: Comma Separated Value Pin
Christian Graus19-Feb-09 21:59
protectorChristian Graus19-Feb-09 21:59 
AnswerRe: Comma Separated Value Pin
J4amieC19-Feb-09 22:10
J4amieC19-Feb-09 22:10 
Questionhotmail address book import. Pin
VijayVishwakarma19-Feb-09 20:56
VijayVishwakarma19-Feb-09 20:56 
QuestionHow to Get Short date in Proper Format? Pin
mr_muskurahat19-Feb-09 20:28
mr_muskurahat19-Feb-09 20:28 
AnswerRe: How to Get Short date in Proper Format? Pin
Gaurav K Singh19-Feb-09 20:38
Gaurav K Singh19-Feb-09 20:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.