Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 15th, 2013, 05:09 AM
Authorized User
Points: 207, Level: 4
Points: 207, Level: 4 Points: 207, Level: 4 Points: 207, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2012
Posts: 40
Thanks: 8
Thanked 5 Times in 4 Posts
Default reload the page with dyanamic content based on user link click

I am having a listview on a page displaying title of articles[news].
  1. I want to display by default the top news[along with full article] in the adjoining section.
  2. Further i want to update the adjoining section[one with full description] based on user link click in the title only section.

I first thought of implementing the objective via the same method as described on page-464 [customizing the detailsview & handling its events] but it has the dropdownlist items bound to db whereas i am not having dropdownlist so cant bind.

Can any please guide me to relevant code or implementation or how shall i proceed.

Will be a great help. Thanks.
Reply With Quote
  #2 (permalink)  
Old August 15th, 2013, 02:02 PM
Authorized User
Points: 207, Level: 4
Points: 207, Level: 4 Points: 207, Level: 4 Points: 207, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2012
Posts: 40
Thanks: 8
Thanked 5 Times in 4 Posts
Default

Hi ok are there any suggestions how can i open a new page based on link click and fetch data based on the link clicked previously ?? [Just like blogs] Thanks
Reply With Quote
  #3 (permalink)  
Old August 15th, 2013, 02:26 PM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Can you explain what it is you're trying to accomplish? I don't understand what you want which makes it impossible to suggest something. Also, why doesn't the example in the book work for you?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #4 (permalink)  
Old August 15th, 2013, 02:32 PM
Authorized User
Points: 207, Level: 4
Points: 207, Level: 4 Points: 207, Level: 4 Points: 207, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2012
Posts: 40
Thanks: 8
Thanked 5 Times in 4 Posts
Default

hello Imar actually i have gone through the book and am currently eperimenting/learning by making demo projects.

Here is what i have found to be a solution just now:

I want a link which is dynamically generated and points to another page where its[link's] value is used to retrieve data from db.

Quote:
<asp:Hyperlink runat= "server" Text='<%# DataBinder.Eval(Container.DataItem,"Results")%>' NavigateUrl='<%# "Testpage2.aspx?id=" + DataBinder.Eval (Container.DataItem,"ID")%>' ID="Link2" />
But also learnt that it's unsafe [subject to injections.]

Please please please, just spend few minutes of your precious time to point me any direction to go.
Reply With Quote
  #5 (permalink)  
Old August 15th, 2013, 02:34 PM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

>> Please please please, just spend few minutes of your precious time to point me any direction to go.

Would love to, if I knew what help you needed.

The example you posted should work. What;s wrong with it? Why doesn't it work or why would it be unsafe?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #6 (permalink)  
Old August 15th, 2013, 02:35 PM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

BTW: Is Exercise 3 of Chapter 14 what you're looking for?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #7 (permalink)  
Old August 15th, 2013, 02:44 PM
Authorized User
Points: 207, Level: 4
Points: 207, Level: 4 Points: 207, Level: 4 Points: 207, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2012
Posts: 40
Thanks: 8
Thanked 5 Times in 4 Posts
Default

sir at first i tried to base out mine problems solution on the try out in chapter 13 [page 464] customizing the details view and handling its events where you have shown how to bind db to dropdown list

but then i realised a better solution would be to load a new page with the id of the dynamic link.

1) mine page is having listview [for news titles/headings]
2) i want to open a new page based on the link click[for news details]
3) in the newly opened page i want to fill the listview item template with the news details

problem:

how to open a new page based on link click and use the id of the link to fetch data

-------------------
edit:

the other user probably more experienced says it's unsafe in comments here :http://stackoverflow.com/a/9606848/1936980

the answer i found : http://stackoverflow.com/a/9636024/1936980

if you have posted any blog or article to tackle any similiar issue would be very helpful

Last edited by 07Raghav; August 15th, 2013 at 02:54 PM..
Reply With Quote
  #8 (permalink)  
Old August 15th, 2013, 02:58 PM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Did you see the exercise I referred to? It explains exactly how to do it.

That solution is safe as the ID is passed from page to page and then converted into an integer before it's used.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #9 (permalink)  
Old August 15th, 2013, 03:27 PM
Authorized User
Points: 207, Level: 4
Points: 207, Level: 4 Points: 207, Level: 4 Points: 207, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2012
Posts: 40
Thanks: 8
Thanked 5 Times in 4 Posts
Default

Thanks for your help sir, will look into it. Please also do consider writing books on more subjects.. like ajax, jquery or db.
Reply With Quote
  #10 (permalink)  
Old August 15th, 2013, 03:45 PM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

>> Please also do consider writing books on more subjects.. like ajax, jquery or db.

If only there were 36 hours in a day ;-)

I hope to have addressed these topics with dedicated chapters in the book....

Cheers.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
reload the page with dyanamic content based on user link click 07Raghav BOOK: Professional ASP.NET 4 : in C# and VB 0 August 14th, 2013 11:02 PM
Replace Content based on button click Ciupaz ASP.NET 4 General Discussion 2 February 14th, 2012 04:22 PM
How to Change the page content Per User bex ASP.NET 2.0 Professional 9 January 16th, 2009 03:40 PM
Reload page Tooltip not work - Reload xslt file? ismailc XSLT 10 January 22nd, 2008 10:03 AM



All times are GMT -4. The time now is 09:52 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.