Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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
 
Old July 27th, 2007, 02:36 AM
Authorized User
 
Join Date: Jul 2007
Posts: 24
Thanks: 1
Thanked 0 Times in 0 Posts
Default Edit Templates

Hi, to all. I have taken a template column in a datagrid and have inserted image button as an item template. I want when the user click that button it identifies the project code which is bound column where data is coming from backend SQL server. When he click on that image button it should identify the project code of that column and then pass that particular value to session variable and then redirect to the next page. Earlier i used select button of the datagrid and used selectedIndexchanged as an event in which i was identifying columns and passing that value to session variables and after passing those values i
was redirecting to the next page.

Private Sub dg_summary_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles dg_summary.SelectedIndexChanged
    Session("PName") = dg_summary.SelectedItem.Cells(0).Text
    Session("PCode") = dg_summary.SelectedItem.Cells(1).Text
   Response.Redirect("report.aspx")
End Sub

But this logic won't work in case of item templates. Can you tell the possible solution. The only thing i could think of is using
itemcommand as event and then pass the value in e.command argument.


 
Old July 27th, 2007, 03:52 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Plz do not cross post, find the answer from the below link:

http://p2p.wrox.com/topic.asp?TOPIC_ID=63399

Regards
Mike

Don't expect too much, too soon.





Similar Threads
Thread Thread Starter Forum Replies Last Post
"templates" Somesh ASP.NET 2.0 Professional 8 March 27th, 2007 08:53 AM
Templates pilcher85 Dreamweaver (all versions) 1 March 21st, 2007 05:51 PM
Templates ervinel Classic ASP Basics 0 July 13th, 2006 02:47 PM
Templates Neal XSLT 1 February 10th, 2006 07:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.