Dynamic music player....
-
I wanna embed an audio player.....im retrieving location of that song file from querystring which means i can't embed that player in my code behind...i have to embed that player in event handler page..... image1.AlternateText = Request.QueryString["art"]; image1.ImageUrl = Request.QueryString["imgg"]; label2.Text = image1.AlternateText; Response.Write("<OBJECT width=312px height=248px clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 VIEWASTEXT>"); Response.Write("<PARAM name=autoStart value=False>"); Response.Write("<PARAM name=URL value='" + Request.QueryString["u"] + "'>"); but the problem is that i used this page under master page...and the content of master page and other code behind contents are not visible only i see this dynamically generated player because code behind content is in content placeholder of master....is there any way that i can embed this player in my code behind but give the value of it's url from querystring....
-
I wanna embed an audio player.....im retrieving location of that song file from querystring which means i can't embed that player in my code behind...i have to embed that player in event handler page..... image1.AlternateText = Request.QueryString["art"]; image1.ImageUrl = Request.QueryString["imgg"]; label2.Text = image1.AlternateText; Response.Write("<OBJECT width=312px height=248px clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 VIEWASTEXT>"); Response.Write("<PARAM name=autoStart value=False>"); Response.Write("<PARAM name=URL value='" + Request.QueryString["u"] + "'>"); but the problem is that i used this page under master page...and the content of master page and other code behind contents are not visible only i see this dynamically generated player because code behind content is in content placeholder of master....is there any way that i can embed this player in my code behind but give the value of it's url from querystring....
greendragons wrote:
.is there any way that i can embed this player in my code behind but give the value of it's url from querystring....
I don't remotely understand this question. If you generate the HTML in your ASPX or your code behind is TOTALLY irrelevant to the end result. What on earth are you trying to ask ? Oh, you're using response.write ? To use a content page, I think you need to set up a literal in the page, and set it's content in the code, so that it appears in the right place ( inside the content holder ).
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
greendragons wrote:
.is there any way that i can embed this player in my code behind but give the value of it's url from querystring....
I don't remotely understand this question. If you generate the HTML in your ASPX or your code behind is TOTALLY irrelevant to the end result. What on earth are you trying to ask ? Oh, you're using response.write ? To use a content page, I think you need to set up a literal in the page, and set it's content in the code, so that it appears in the right place ( inside the content holder ).
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Thnx....can u give me little idea about code so that i can use retrieved url to play music on page...
-
Thnx....can u give me little idea about code so that i can use retrieved url to play music on page...
Request.QueryString ?
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Request.QueryString ?
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Actually im creating a song site...user clicks the song and the location of that song is picked up from database and sent to the player page in which i want that song to be played...im sending that location value through Response.redirect......so have to be retrieved on player page through Request.Querystring...
-
I wanna embed an audio player.....im retrieving location of that song file from querystring which means i can't embed that player in my code behind...i have to embed that player in event handler page..... image1.AlternateText = Request.QueryString["art"]; image1.ImageUrl = Request.QueryString["imgg"]; label2.Text = image1.AlternateText; Response.Write("<OBJECT width=312px height=248px clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 VIEWASTEXT>"); Response.Write("<PARAM name=autoStart value=False>"); Response.Write("<PARAM name=URL value='" + Request.QueryString["u"] + "'>"); but the problem is that i used this page under master page...and the content of master page and other code behind contents are not visible only i see this dynamically generated player because code behind content is in content placeholder of master....is there any way that i can embed this player in my code behind but give the value of it's url from querystring....
hey.. dont write in response using Response.Write... Its not good. Rather place the object tag in the designer and handle from codebehind. Also if you write Respons.write("<object width... It will show you <object. Rather than using < use < itself so that browser renders the html. Now it is no big deal if you are using masterpage or not. Just in your codebehind if you want to add some reference to parameter to a serverside control, add control.ClientId rather than control.Id. hope you can do it now. :)
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
-
Actually im creating a song site...user clicks the song and the location of that song is picked up from database and sent to the player page in which i want that song to be played...im sending that location value through Response.redirect......so have to be retrieved on player page through Request.Querystring...
Right, so what is the issue ? What's the legality of the songs you're putting on your site ? Where do they come from ?
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
hey.. dont write in response using Response.Write... Its not good. Rather place the object tag in the designer and handle from codebehind. Also if you write Respons.write("<object width... It will show you <object. Rather than using < use < itself so that browser renders the html. Now it is no big deal if you are using masterpage or not. Just in your codebehind if you want to add some reference to parameter to a serverside control, add control.ClientId rather than control.Id. hope you can do it now. :)
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
IM sry....lil' confused...:( can u write lil' in codes plzzz....
-
hey.. dont write in response using Response.Write... Its not good. Rather place the object tag in the designer and handle from codebehind. Also if you write Respons.write("<object width... It will show you <object. Rather than using < use < itself so that browser renders the html. Now it is no big deal if you are using masterpage or not. Just in your codebehind if you want to add some reference to parameter to a serverside control, add control.ClientId rather than control.Id. hope you can do it now. :)
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
coz it's object Tag means html one...not asp so how to add control id property....
-
coz it's object Tag means html one...not asp so how to add control id property....
Here are your issues. You're trying to create some sort of pirate music site. Which I expect is for your own use, which makes me think that you're trying to pick up a bare minimum of knowledge in order to achieve it. We're not going to write all the code for you. There is no reason for the master page to make any difference. The query string is visible everywhere. In fact, your best bet, IMO, is to set up the player inside your aspx, and have some server tags which cause it to render the right properties from a code behind property, which in turn reads the query string.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Here are your issues. You're trying to create some sort of pirate music site. Which I expect is for your own use, which makes me think that you're trying to pick up a bare minimum of knowledge in order to achieve it. We're not going to write all the code for you. There is no reason for the master page to make any difference. The query string is visible everywhere. In fact, your best bet, IMO, is to set up the player inside your aspx, and have some server tags which cause it to render the right properties from a code behind property, which in turn reads the query string.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
what????? Im making site for my college project.....and yeah i don't know much about adding literal controls....coz i hardly use html controls instead i prefer asp controls and i also could have used mediaplayer toolkit but it's trail i have so wanted to do with html code......???????????
-
what????? Im making site for my college project.....and yeah i don't know much about adding literal controls....coz i hardly use html controls instead i prefer asp controls and i also could have used mediaplayer toolkit but it's trail i have so wanted to do with html code......???????????
Well, you went all quiet when I asked if it was legal. I appear to be spot on. This is your college project, we've explained exactly how to do it. If you're stuck, post specific code and explain why you';re still stuck. Don't just ask us for code, if you're in college, you can surely understand the explanations we've given ?
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Well, you went all quiet when I asked if it was legal. I appear to be spot on. This is your college project, we've explained exactly how to do it. If you're stuck, post specific code and explain why you';re still stuck. Don't just ask us for code, if you're in college, you can surely understand the explanations we've given ?
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
protected void Page_Load(object sender, EventArgs e) { image1.AlternateText = Request.QueryString["art"]; image1.ImageUrl = Request.QueryString["imgg"]; label2.Text = image1.AlternateText; string loc = Request.QueryString["u"]; Panel1.Controls.Add(new LiteralControl("<OBJECT width=312px height=248px CLASSID=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 VIEWASTEXT >")); Panel1.Controls.Add(new LiteralControl("<PARAM name=autoStart value=False>")); Panel1.Controls.Add(new LiteralControl(@"<PARAM name=URL value="+loc+">")); Panel1.Controls.Add(new LiteralControl("</OBJECT>")); } i got it....actually i was using Response.Write what actually showing controls in browsers but not master page contents....now using this literalcontrols i did but still problem is that it's not playing the song....n my url is perfectly right........
-
protected void Page_Load(object sender, EventArgs e) { image1.AlternateText = Request.QueryString["art"]; image1.ImageUrl = Request.QueryString["imgg"]; label2.Text = image1.AlternateText; string loc = Request.QueryString["u"]; Panel1.Controls.Add(new LiteralControl("<OBJECT width=312px height=248px CLASSID=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 VIEWASTEXT >")); Panel1.Controls.Add(new LiteralControl("<PARAM name=autoStart value=False>")); Panel1.Controls.Add(new LiteralControl(@"<PARAM name=URL value="+loc+">")); Panel1.Controls.Add(new LiteralControl("</OBJECT>")); } i got it....actually i was using Response.Write what actually showing controls in browsers but not master page contents....now using this literalcontrols i did but still problem is that it's not playing the song....n my url is perfectly right........
even i checked still not playing...is it coz im using literalcontrols.....and when im using this code in source it's playing perfectly well Panel1.Controls.Add(new LiteralControl("<OBJECT width=312px height=248px CLASSID=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 VIEWASTEXT >")); Panel1.Controls.Add(new LiteralControl("<PARAM name=autoStart value=False>")); Panel1.Controls.Add(new LiteralControl(@"<PARAM name=URL value=F:\Songs\Britney Spears\Circus-2008\01 Britney Spears - Womanizer.mp3>")); Panel1.Controls.Add(new LiteralControl("</OBJECT>"));
-
protected void Page_Load(object sender, EventArgs e) { image1.AlternateText = Request.QueryString["art"]; image1.ImageUrl = Request.QueryString["imgg"]; label2.Text = image1.AlternateText; string loc = Request.QueryString["u"]; Panel1.Controls.Add(new LiteralControl("<OBJECT width=312px height=248px CLASSID=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 VIEWASTEXT >")); Panel1.Controls.Add(new LiteralControl("<PARAM name=autoStart value=False>")); Panel1.Controls.Add(new LiteralControl(@"<PARAM name=URL value="+loc+">")); Panel1.Controls.Add(new LiteralControl("</OBJECT>")); } i got it....actually i was using Response.Write what actually showing controls in browsers but not master page contents....now using this literalcontrols i did but still problem is that it's not playing the song....n my url is perfectly right........
greendragons wrote:
Panel1.Controls.Add(new LiteralControl("")); Panel1.Controls.Add(new LiteralControl("")); Panel1.Controls.Add(new LiteralControl(@"")); Panel1.Controls.Add(new LiteralControl(""));
Create a literal on the page, then build a string, and assign that string to the one literal. It's neater. Does your URL have spaces ? Should it be in quotes ?
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
greendragons wrote:
Panel1.Controls.Add(new LiteralControl("")); Panel1.Controls.Add(new LiteralControl("")); Panel1.Controls.Add(new LiteralControl(@"")); Panel1.Controls.Add(new LiteralControl(""));
Create a literal on the page, then build a string, and assign that string to the one literal. It's neater. Does your URL have spaces ? Should it be in quotes ?
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Yes did that but i wanna include location value in quotes unless it won't play....but if i'll put quotes in between it will terminate the string....how to include quotes......
-
Yes did that but i wanna include location value in quotes unless it won't play....but if i'll put quotes in between it will terminate the string....how to include quotes......
Add \" to encode a double quote, or single quotes if you can.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Add \" to encode a double quote, or single quotes if you can.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Thnx alot.....