|
Thanks for the reply, but that's not quite the answer I was looking for. My 'child' pages have a 1:1 relationship with the 'parent' page. So, while it may be a good idea to host the child page as a control, it's not for the benefit of code reuse. Master pages won't solve my problem; either. Again - the 1:1 relationship between parent and child.
Thanks again for the reply.
john
http://tagyurit.com
r
|
|
|
|
|
OK, well, you can break pages up into components if they are insanely compicated, but the resultant plumbing code could well negate any advantage you may get. Breaking your code into regions may help readability if there's a lot of code.
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.
|
|
|
|
|
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&gt;");
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.
|
|
|
|
|
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.
|
|
|
|
|
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.
|
|
|
|
|
IM sry....lil' confused... can u write lil' in codes plzzz....
|
|
|
|
|
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.
|
|
|
|
|
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.
|
|
|
|
|
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>"));
|
|
|
|
|
greendragons wrote: 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(""));
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......
|
|
|
|
|
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.
|
|
|
|
|
|
Hi,
I have the following string in a XML file..
</BODY></HTML> ------_=_NextPart_002_01C84D7E.9133E008-- Content-Disposition: attachment; filename="footer.txt" Content-Transfer-Encoding: base64 G:\Test\Attach\footer.txt --------------Boundary-00=_BLD1cvEPKmuNkgPvUNY3--
Content-Disposition: attachment; filename="Press list for partners.xls" Content-Transfer-Encoding: base64 g:\Test\Attach\Debankan\Press.xls ------_=_NextPart_001_01C84D7E.9133E008--
I will pass the filename and i want to get the path from the above string.. For ex.. if i pass "footer.txt" i want the result path as "G:\Test\Attach\footer.txt".. Can someone help me out?. I will be using C#. Can someone tell what String Methods will be useful.. Please it quite urgent..
Thanks
Raja
|
|
|
|
|
Jollyguy wrote: Please it quite urgent..
This is not urgent but rude.
And how is this related to ASP.Net?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
|
Hi,
I am inserting in database using ASP.Net. But the insertion in the tables is not happening in the order of insertion. Please help me how to insert in order.
for()
{
for()
{
for()
{
//method to insert(like Physics1A)
}
//method to insert(like Physics1)
}
//method to insert(like Physics)
}
I want in this order.
Class
Physics1A
Physics1B
Physics1C
Physics1
Physics
Chemistry1A
Chemistry1B
Chemistry1
Chemistry
But it is not inserting in this order. Please help me.
|
|
|
|
|
The above tells us almost nothing about what you are trying to achieve. Post the code that you have tried, and pointing out the areas that do not work. Do not expect someone to write your code for you.
|
|
|
|