pass value to another page with out using state management technique

Posted by Gopal_nivas under ASP.NET on 1/12/2012 | Points: 10 | Views : 1564 | Status : [Member] | Replies : 7
hi..

pass value to another page with out using state management technique?

i am using master page for my child pages.

need ur suggestions..

regards
gopal.s




Responses

Posted by: Avdesh on: 1/12/2012 [Member] Starter | Points: 25

Up
0
Down
For what purpose are u using this.
kindly tell me the reason?
thanks regards
(AVDESH)

Gopal_nivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hmanjarawala on: 1/12/2012 [Member] Bronze | Points: 25

Up
0
Down
ya you can do this.

write form tag
<Form id="" action="navigation-url of your destination page" method="post></form>

put your rest of .aspx file code between this form tag. and from destination page you'll get this


Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Gopal_nivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 1/12/2012 [Member] Silver | Points: 25

Up
0
Down

Hi, Hmanjarawala
In the destination page how to read data of parent page control , can you explain , showing an example?

Thanks

Sanjay

Thanks,
Sanjay

Gopal_nivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Self-innovator on: 1/13/2012 [Member] Bronze | Points: 25

Up
0
Down
try with QueryString

Join Hands Change lives
Thanks & Regards
Straight Edge Society

Gopal_nivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 1/13/2012 [Member] Silver | Points: 25

Up
0
Down

If there are 50controls , is it advisible to go through passing qurerystring?

Thanks,
Sanjay

Gopal_nivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hmanjarawala on: 1/14/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi SK,
currently i dont have example for this, but you can find it on internet and ya you can get all variables passing from the parent page tochild page using Response Object using Response.Get("Variable-name or index")

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Gopal_nivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 1/14/2012 [Member] Silver | Points: 25

Up
0
Down
--Parent PAge

<form id="form1" runat="server" action="child.aspx" method="post">

<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<br />
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
<br />
<asp:Button ID="Button1" runat="server" Text="Button"
onclick="Button1_Click" />
</form>
----child Page
protected void Page_Load(object sender, EventArgs e)
{
System.Text.StringBuilder displayValues =
new System.Text.StringBuilder();
System.Collections.Specialized.NameValueCollection
postedValues = Request.Form;
String nextKey;
for (int i = 0; i < postedValues.AllKeys.Length; i++)
{
nextKey = postedValues.AllKeys[i];
if (nextKey.Substring(0, 2) != "__")
{
displayValues.Append("<br>");
displayValues.Append(nextKey);
displayValues.Append(" = ");
displayValues.Append(postedValues[i]);
}
}
Label1.Text = displayValues.ToString();
}


Hi, i got a a sollution for it, which may help Gopal.

Thanks,
Sanjay

Gopal_nivas, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response