Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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 October 16th, 2006, 05:36 AM
Registered User
 
Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kawalsingh28 Send a message via Yahoo to kawalsingh28
Default passing argument to a page in c#

hi!

i m trying to pass 'sFileTicket' as an argument to the FileViewer.aspx page. using ?id[] is posssible in ASPX code but i want to do it in c# in code behind. any suggestion would be appreciated..

    HyperLinkColumn objFileViewerSource = new HyperLinkColumn();
            //objFileViewerSource.HeaderText = oResource.GetString("txtFileRetention");
            objFileViewerSource.HeaderStyle.CssClass = "DataGridHeaderStyle";
            objFileViewerSource.ItemStyle.Width = 150;
            objFileViewerSource.NavigateUrl = "FileViewer.aspx?ID={0}";
            //objFileViewerSource.DataNavigateUrlField = "sFileTicket";
            objFileViewerSource.Text = "<img src='images/TechnicalDataHook.jpg' border=0>";
            //objFileViewerSource.DataField = "FileViewerSource";



thanx
kawal
 
Old October 16th, 2006, 05:54 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

use Session object.

Bijgupt
 
Old October 16th, 2006, 06:10 AM
Registered User
 
Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kawalsingh28 Send a message via Yahoo to kawalsingh28
Default

can u elaborate a bit..

 thanx
kawal
 
Old October 16th, 2006, 07:02 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

On the page above do Session("id") = value;

on your recieving page do this

int id = Session("id");

hth.

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature





Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing an argument to a web service from a client dotNETnewbie ASP.NET 2.0 Professional 0 April 10th, 2006 11:38 AM
Window.Open not passing argument in ASP.NET whiterainbow Javascript How-To 2 May 10th, 2005 04:03 AM
passing datatype as a function argument texasraven VB.NET 0 September 23rd, 2003 10:22 AM
passing datatype as a function argument texasraven VB.NET 2002/2003 Basics 0 September 23rd, 2003 10:14 AM





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