<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Web Forms</title><link>http://forums.asp.net/18.aspx</link><description>All about building ASP.NET Pages - server controls, events, validation, etc.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Passing parameter from one one ASPX to another ASPX ?</title><link>http://forums.asp.net/thread/974024.aspx</link><pubDate>Thu, 30 Jun 2005 15:18:24 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:974024</guid><dc:creator>mw:17:61</dc:creator><author>mw:17:61</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/974024.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=974024</wfw:commentRss><description>&lt;P&gt;You may want to distinguish parameters visible to all users, visible to current session or to current request. There is an approach that halps to keep everthing together.&lt;BR&gt;public abstract class MyContext&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;private&amp;nbsp;const string SessionParamKey = "xxxx";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;private&amp;nbsp;const string &lt;FONT size=2&gt;GlobalParamKey&lt;/FONT&gt;= "xxxx";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;private&amp;nbsp;const string CurrentRequestParamKey= "xxxx";&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public static MyTypeOne GlobalParam&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;get&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return &lt;FONT size=2&gt;System&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;Web&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;HttpContext&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;Current&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;Cache[GlobalParamKey];&lt;BR&gt;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT size=2&gt;System&lt;FONT color=#0000ff&gt;.&lt;/FONT&gt;Web&lt;FONT color=#0000ff&gt;.&lt;/FONT&gt;HttpContext&lt;FONT color=#0000ff&gt;.&lt;/FONT&gt;Current&lt;FONT color=#0000ff&gt;.&lt;/FONT&gt;Cache[GlobalParamKey] = value;&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public static MyTypeTwo SessionParam&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;get&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return &lt;FONT size=2&gt;System&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;Web&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;HttpContext&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;Current&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;Session[&lt;FONT size=3&gt;SessionParamKey&lt;/FONT&gt;];&lt;BR&gt;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT size=2&gt;System&lt;FONT color=#0000ff&gt;.&lt;/FONT&gt;Web&lt;FONT color=#0000ff&gt;.&lt;/FONT&gt;HttpContext&lt;FONT color=#0000ff&gt;.&lt;/FONT&gt;Current&lt;FONT color=#0000ff&gt;.&lt;/FONT&gt;Session[&lt;FONT size=3&gt;SessionParamKey&lt;/FONT&gt;] = value;&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public static MyTypeTwo CurrentRequestParam&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;get&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return &lt;FONT size=2&gt;System&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;Web&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;HttpContext&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;Current&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;Items[&lt;FONT size=3&gt;CurrentRequestParamKey&lt;/FONT&gt;];&lt;BR&gt;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT size=2&gt;System&lt;FONT color=#0000ff&gt;.&lt;/FONT&gt;Web&lt;FONT color=#0000ff&gt;.&lt;/FONT&gt;HttpContext&lt;FONT color=#0000ff&gt;.&lt;/FONT&gt;Current&lt;FONT color=#0000ff&gt;.&lt;/FONT&gt;Items[&lt;FONT size=3&gt;CurrentRequestParamKey&lt;/FONT&gt;] = value;&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;}&lt;/P&gt;</description></item><item><title>Re: Passing parameter from one one ASPX to another ASPX ?</title><link>http://forums.asp.net/thread/973996.aspx</link><pubDate>Thu, 30 Jun 2005 15:01:35 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:973996</guid><dc:creator>fadil1977</dc:creator><author>fadil1977</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/973996.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=973996</wfw:commentRss><description>Hi tarjei!!!!&lt;BR&gt;&lt;BR&gt;do you mean that you have another way to do it??? can you please include a code sample ?? if you do not mind....</description></item><item><title>Re: Passing parameter from one one ASPX to another ASPX ?</title><link>http://forums.asp.net/thread/973923.aspx</link><pubDate>Thu, 30 Jun 2005 14:17:08 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:973923</guid><dc:creator>stevenbey</dc:creator><author>stevenbey</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/973923.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=973923</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;table width="85%"&gt;&lt;tr&gt;&lt;td class="txt4"&gt;&lt;img src="/Themes/default/images/icon-quote.gif"&gt;&amp;nbsp;&lt;strong&gt;tarjei wrote:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="quoteTable"&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td width="100%" valign="top" class="txt4"&gt;&lt;FONT face=Verdana size=2&gt;I like the string property way myself, since there propably isn't anything else than the .Text property you want from the textbox.&lt;BR&gt;&lt;BR&gt;-- &lt;BR&gt;Tarjei&lt;/FONT&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/BLOCKQUOTE&gt;&lt;BR&gt;You obviously like typing a lot more than I do &lt;img src="/emoticons/emotion-5.gif" alt="Wink [;)]" /&gt;&lt;BR&gt;&lt;BR&gt;</description></item><item><title>Re: Passing parameter from one one ASPX to another ASPX ?</title><link>http://forums.asp.net/thread/973914.aspx</link><pubDate>Thu, 30 Jun 2005 14:12:05 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:973914</guid><dc:creator>tarjei</dc:creator><author>tarjei</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/973914.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=973914</wfw:commentRss><description>&lt;font face="Verdana" size="2"&gt;&lt;BLOCKQUOTE&gt;&lt;table width="85%"&gt;&lt;tr&gt;&lt;td class="txt4"&gt;&lt;img src="/Themes/default/images/icon-quote.gif"&gt;&amp;nbsp;&lt;strong&gt;fadil1977 wrote:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="quoteTable"&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td width="100%" valign="top" class="txt4"&gt;this is lovley
solution... but what about if&amp;nbsp; you have more than one value and
more than control type.... can you use the same if yes please provide
code !!&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/BLOCKQUOTE&gt;&lt;br&gt;
&lt;br&gt;
You can of course add more public properties, or do it Steven's way by
exposing the whole textbox as a public variable (less typing too..).
Anything you make public is accessible. I like the string property way
myself, since there propably isn't anything else than the .Text
property you want from the textbox.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Tarjei&lt;br&gt;
&lt;/font&gt;</description></item><item><title>Re: Passing parameter from one one ASPX to another ASPX ?</title><link>http://forums.asp.net/thread/973873.aspx</link><pubDate>Thu, 30 Jun 2005 13:50:46 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:973873</guid><dc:creator>stevenbey</dc:creator><author>stevenbey</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/973873.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=973873</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;table width="85%"&gt;&lt;tr&gt;&lt;td class="txt4"&gt;&lt;img src="/Themes/default/images/icon-quote.gif"&gt;&amp;nbsp;&lt;strong&gt;fadil1977 wrote:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="quoteTable"&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td width="100%" valign="top" class="txt4"&gt;this is lovley solution... but what about if&amp;nbsp; you have more than one value and more than control type.... can you use the same if yes please provide code !!&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/BLOCKQUOTE&gt;&lt;BR&gt;You don't have to create a Property for each Control, as long as each Control is defined as public. For example:&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;WebForm1:&lt;BR&gt;&lt;FONT face="Courier New"&gt;public&amp;nbsp;TextBox myTextBox;&lt;BR&gt;&lt;/FONT&gt;&lt;BR&gt;WebForm2, inside Page_Load:&lt;BR&gt;&lt;FONT face="Courier New"&gt;if (!IsPostBack) {&lt;BR&gt;&amp;nbsp; WebForm1 webForm1 = Context.Handler as WebForm1;&lt;BR&gt;&lt;BR&gt;&amp;nbsp; if (null != webForm1) {&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write(webForm1.myTextBox.Text);&lt;BR&gt;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;</description></item><item><title>Re: Passing parameter from one one ASPX to another ASPX ?</title><link>http://forums.asp.net/thread/973843.aspx</link><pubDate>Thu, 30 Jun 2005 13:30:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:973843</guid><dc:creator>fadil1977</dc:creator><author>fadil1977</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/973843.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=973843</wfw:commentRss><description>this is lovley solution... but what about if&amp;nbsp; you have more than one value and more than control type.... can you use the same if yes please provide code !!</description></item><item><title>Re: Passing parameter from one one ASPX to another ASPX ?</title><link>http://forums.asp.net/thread/973837.aspx</link><pubDate>Thu, 30 Jun 2005 13:25:45 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:973837</guid><dc:creator>timoth</dc:creator><author>timoth</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/973837.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=973837</wfw:commentRss><description>&lt;P&gt;The way&amp;nbsp;I have done this so you don't need to use session is:&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;1. Make a serializable class like this:&lt;/FONT&gt;&lt;BR&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;&lt;BR&gt;&amp;lt;Serializable()&amp;gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Class&lt;/FONT&gt;&lt;FONT size=2&gt; RefundVars&lt;BR&gt;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public myVar as string&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public myVar2 as string&lt;BR&gt;End Class&lt;BR&gt;&lt;BR&gt;It has to be serializable because you may want to add it to viewstate if your page postbacks to itself so you can remember it&lt;BR&gt;&lt;BR&gt;2. Then fill this class before you redirect to the next page and add it to CONTEXT.Items like this:&lt;BR&gt;&lt;BR&gt;context.Items.Add("refundInfo", refundInfo)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;BR&gt;&lt;FONT color=#000000&gt;3. Then user server.transfer to go to the next page:&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;Server.Transfer(strWebPageName)&lt;BR&gt;&lt;BR&gt;4. Then in the next page you can pick up the variables:&lt;BR&gt;&lt;FONT size=2&gt;&lt;BR&gt;refundInfo = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;CType&lt;/FONT&gt;&lt;FONT size=2&gt;(context.Items("refundInfo"), RefundVars)&lt;BR&gt;&lt;BR&gt;--------------------&lt;BR&gt;If this is a fundamental thing of the whole application, you can make an ancestor code behind page class and code the page_load event as follows:&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;&lt;BR&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; (Page.IsPostBack = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;False&lt;/FONT&gt;&lt;FONT size=2&gt;) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'first time loading the page&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Not&lt;/FONT&gt;&lt;FONT size=2&gt; IsNothing(context.Items("refundInfo")) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'catch passed variables and store in page level variable&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'for page processing or passing to next page&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;refundInfo = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;CType&lt;/FONT&gt;&lt;FONT size=2&gt;(context.Items("refundInfo"), RefundVars)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'save&amp;nbsp;variable in viewstate for postbacks of the &lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;web page&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;viewState("refundInfo") = refundInfo&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Else&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'post back of the page, unload our variable from viewstate&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Not&lt;/FONT&gt;&lt;FONT size=2&gt; IsNothing(viewstate("refundInfo")) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;refundInfo = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;CType&lt;/FONT&gt;&lt;FONT size=2&gt;(viewstate("refundInfo"), RefundVars)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000000&gt;And when you transfer to another page, use this ancestor function:&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;BR&gt;Public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; passInfoToNextPage(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; strWebPageName &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;BR&gt;&lt;/FONT&gt;&lt;BR&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Not&lt;/FONT&gt;&lt;FONT size=2&gt; IsNothing(refundInfo) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'add to context item&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Not&lt;/FONT&gt;&lt;FONT size=2&gt; IsNothing(context.Items("refundInfo")) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;context.Items.Remove("refundInfo")&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;context.Items.Add("refundInfo", refundInfo)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;Server.Transfer(strWebPageName)&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description></item><item><title>Re: Passing parameter from one one ASPX to another ASPX ?</title><link>http://forums.asp.net/thread/973816.aspx</link><pubDate>Thu, 30 Jun 2005 13:10:36 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:973816</guid><dc:creator>Garbin</dc:creator><author>Garbin</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/973816.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=973816</wfw:commentRss><description>Hi,&lt;BR&gt;&lt;BR&gt;if you want to pass "simple" values, you can put them in the query string for the URL of the destination page.&lt;BR&gt;For example, if you want to pass the parameters "action" and "id" from Page1.aspx to Page2.aspx, you can do (from Page1):&lt;BR&gt;&lt;BR&gt;Response.Redirect("Page2.aspx?action=view&amp;amp;id=1234");&lt;BR&gt;&lt;BR&gt;The querystring starts with a question mark '?' and contains name-value pairs, each one separated by '&amp;amp;'&lt;BR&gt;&lt;BR&gt;In Page2.aspx, you can access the querystring from the property Request.QueryString. You will obtain a NameValueCollection &lt;BR&gt;that can be accessed also by index. For example:&lt;BR&gt;&lt;BR&gt;string action = Request.QueryString["action"];&lt;BR&gt;string id = Request.QueryString["id"];&lt;BR&gt;&lt;BR&gt;If you want to pass anything to your destination page (i.e. objects), you can expose them through public properties in Page1.aspx.&lt;BR&gt;Then, in Page2.aspx, you can retrieve the object representing your Page1 WebForm.&lt;BR&gt;Let's suppose you want to access an ArrayList. In Page1.aspx codebehind, you'll have a public property:&lt;BR&gt;&lt;BR&gt;public ArrayList Arr&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;get { return myArr;}&lt;BR&gt;&amp;nbsp;&amp;nbsp; set { myArr = value;}&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;On Page1.aspx, you will request Page2.aspx with the statement:&lt;BR&gt;&lt;BR&gt;Server.Transfer("Page2.aspx");&lt;BR&gt;&lt;BR&gt;On Page2.aspx you can get the form that requested the page (e.g. Page1):&lt;BR&gt;&lt;BR&gt;Page1 handler = (Page1)Context.Handler;&lt;BR&gt;&lt;BR&gt;Then, you can access the public properties of the Page1 WebForm:&lt;BR&gt;&lt;BR&gt;ArrayList arr = handler.Arr;</description></item><item><title>Re: Passing parameter from one one ASPX to another ASPX ?</title><link>http://forums.asp.net/thread/973810.aspx</link><pubDate>Thu, 30 Jun 2005 13:07:13 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:973810</guid><dc:creator>tarjei</dc:creator><author>tarjei</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/973810.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=973810</wfw:commentRss><description>&lt;font face="Verdana" size="2"&gt;Hello,&lt;br&gt;
&lt;br&gt;
You can achieve this by using Server.Transfer().&lt;br&gt;
&lt;br&gt;
Make public properties on the page you want to transfer from, and use
Server.Transfer in a button event handler to display the second page.
On the second page, you can get to the public properties on the first
one using Page.Context.Handler.&lt;br&gt;
&lt;br&gt;
An example.&lt;br&gt;
WebForm1:&lt;br&gt;
&lt;font face="Courier New"&gt;protected TextBox myTextBox;&lt;br&gt;
public string MyTextBoxValue {&lt;br&gt;
&amp;nbsp; get { return myTextBox.Text; }&lt;br&gt;
}&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
WebForm2, inside Page_Load:&lt;br&gt;
&lt;font face="Courier New"&gt;if (!IsPostBack) {&lt;br&gt;
&amp;nbsp; WebForm1 webForm1 = Context.Handler as WebForm1;&lt;br&gt;
&lt;br&gt;
&amp;nbsp; if (null != webForm1) {&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write(webForm1.MyTextBoxValue);&lt;br&gt;
&amp;nbsp; }&lt;br&gt;
}&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Tarjei&lt;br&gt;
&lt;/font&gt;&lt;br&gt;</description></item><item><title>Re: Passing parameter from one one ASPX to another ASPX ?</title><link>http://forums.asp.net/thread/973770.aspx</link><pubDate>Thu, 30 Jun 2005 12:34:57 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:973770</guid><dc:creator>dcyoung</dc:creator><author>dcyoung</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/973770.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=973770</wfw:commentRss><description>Pass the parameter in the url &lt;BR&gt;&lt;BR&gt;eg page.aspx?parameterstring1&amp;amp;paramterstring2&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;on the receiving page (c#)&lt;BR&gt;strParam1 = Request.QueryString[0];&lt;BR&gt;strParam2 = Request.QueryString[1];&lt;BR&gt;&lt;BR&gt;</description></item><item><title>Passing parameter from one one ASPX to another ASPX ?</title><link>http://forums.asp.net/thread/973632.aspx</link><pubDate>Thu, 30 Jun 2005 10:12:03 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:973632</guid><dc:creator>bips_kr</dc:creator><author>bips_kr</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/973632.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=973632</wfw:commentRss><description>Hi All 

I am using C# for an web application and I wants to pass on some of the information/data from one ASPX page to another I am avoiding to use the session object, Please advise some solution to it

Thanks</description></item></channel></rss>