 |
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
 | This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

January 12th, 2012, 02:46 PM
|
Friend of Wrox
|
|
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
|
|
Content is still in database, the method I am talking about is to access and display content.
|

January 12th, 2012, 05:09 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
I understand, but who's going to add
[shop Id=1]
to the ASPX file? It feels like a hard coded solution.
I think you're misunderstanding the purpose and usefulness of the query string or other mechanisms to do run-time content binding.
Cheers,
Imar
|

January 13th, 2012, 03:00 AM
|
Friend of Wrox
|
|
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
|
|
Sometimes ago I had to work on PHP for few days but as I am keen to Asp.Net and I love it, I stopped working on that.
And I know you also know PHP (I read somewhere). But in those days I saw that some data is accessed through such code, [shop Id=1] for example, directly in the html editor while writing a blog and nothing else was used, I know that there may be many things behind the scene but I actually don't know what happens.
How many Ids can be sent through querystring? suppose someone wants that he shows few products (which are stored in database) after few paragraphs e.g. he writes one paragraph then shows 1st product, then writes second paragraph and after it shows 2nd product, and so on...(paragraphs are not product description, they are not stored in database).
So now you understand that what I am saying then please tell me what actually this is called and how to make it work.
Thanks...
Last edited by sophia; January 13th, 2012 at 03:07 AM..
|

January 13th, 2012, 03:21 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
I don't know what it's called as I still don't understand what you want, and more importantly, why you'd want it.
[shop Id=1]
in an ASPX context still makes no sense to me.
Like I said, look into Server Controls or User Controls. Then you can do something like this:
<sophia:Shop id="1" runat="server" />
That still doesn't make sense to me though as you'd be hardcoding the ID in the aspx page without the run-time options to manage it.
I don't have much more to add to this....
Cheers,
Imar
|

January 13th, 2012, 04:15 AM
|
Friend of Wrox
|
|
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
|
|
OK, I will go with your suggested solution. But how those two suggestion can be used?
Code:
Lorem Ipsum....
<sophia:shop Id="1" runat="server" />
...
...
Lorem Ipsum...
<sophia:shop Id="3" runat="server" />
...
here how product will be fethced whose id is 1 and 3.
Thanks for suggestions and I think these may be real solution.
|

January 13th, 2012, 06:09 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Take a look at my Beginning ASP.NET 4 book, chapter 8 on User Controls. You'll see how to use the ShopId property in a user control. What you do with that ID is then up to you. You can use any data access technology you're comfortable with to query whatever data you need.
A small correction on my previous example:
<sophia:shop Id="Shop1" ShopId="1" runat="server" />
ID is a reserved property for conrols.
You can achieve something similar with Server Controls. My book doesn't discuss creating those, but Google seems to know a lot about it.
Cheers,
Imar
|

January 13th, 2012, 04:38 PM
|
Friend of Wrox
|
|
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
|
|
Thanks I will try...
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
Survey Engine |
Dennis239 |
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 |
6 |
March 3rd, 2008 02:34 PM |
Language survey |
jminatel |
Perl |
0 |
August 28th, 2007 09:50 PM |
Language survey |
jminatel |
Python |
0 |
August 28th, 2007 09:49 PM |
Language Survey |
jminatel |
Beginning PHP |
0 |
August 28th, 2007 09:48 PM |
Survey engine |
anitafn2005 |
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 |
1 |
October 8th, 2006 04:17 PM |
|
 |