Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Thursday, March 29, 2012

passing values between different projects

Hi,
I h ave one project in C# and the other one in vb.net. I want one of the VB.net webforms to pass a value to C#'s webform. how can I do this ?

Thanks,If they're published to the same website, you can post the values in the Query String or store the values into session. The difference in languages does not matter.

Passing values between pages

Hello everyone, I am very new to ASP.NET and in fact I am working on my first real project and I am in need to some assistance.

I want to pass values from one page to another after clicking on a button and get the values in the page_load routine of the called page.

Can someone tell me how to do this?

Presently my code looks something like this:

Coding of the button click event
I have declared a hidden field on page 1 and called it hidMerchantName, in the click event I am doing the following:

hidMerchantName.Value = dMerchantName.Text
Server.Transfer("~/Statements.aspx", True)

Now on page 2 I want to be able to get the value of hidMerchantName

If you guys also have a better way of passing values please let me know

Hi,

Read this:

http://steveorr.net/faq/PassValues.aspx and also this:

http://odetocode.com/Articles/421.aspx


There are many articles that target your question. I suggest you check out the article below:

Passing values from one page to another
Just go to following link:

http://dkuldeep.blogspot.com/2006/01/posting-to-other-pages-aspnet-20.html

just assume txtName as hidMerchantName.

Regards

Kuldeep Deokule

Saturday, March 24, 2012

Passing Variable" into ASP project using VB

Very new at ASP in dotnet.

If I put a variable in the URL such as

http://mysite/myapp.aspx?variable=123

how do I retrieve the variable from my asp code so that I can use that value
to determine what I send on my page?

Thanks,
LarryRequest.QueryString("variable")

"Larry" <Larry@.NoMail.com> wrote in message
news:QCrCb.34269$8y1.142610@.attbi_s52...
> Very new at ASP in dotnet.
> If I put a variable in the URL such as
> http://mysite/myapp.aspx?variable=123
> how do I retrieve the variable from my asp code so that I can use that
value
> to determine what I send on my page?
> Thanks,
> Larry
That did it. Thank you so much!!!

"alien2_51" <dan.billow"at"n.o.s.p.a.m.monacocoach.commercialversion> wrote
in message news:upm3lPQwDHA.2316@.TK2MSFTNGP10.phx.gbl...
> Request.QueryString("variable")
> "Larry" <Larry@.NoMail.com> wrote in message
> news:QCrCb.34269$8y1.142610@.attbi_s52...
> > Very new at ASP in dotnet.
> > If I put a variable in the URL such as
> > http://mysite/myapp.aspx?variable=123
> > how do I retrieve the variable from my asp code so that I can use that
> value
> > to determine what I send on my page?
> > Thanks,
> > Larry
Hi Larry,

Put this in the codebehind file of your ASP.NET page:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
Dim intVar As Integer
intVar = Request("variable")
Response.Write("You got: " & intVar.ToString)
End Sub

"Larry" <Larry@.NoMail.com> wrote in message
news:QCrCb.34269$8y1.142610@.attbi_s52...
> Very new at ASP in dotnet.
> If I put a variable in the URL such as
> http://mysite/myapp.aspx?variable=123
> how do I retrieve the variable from my asp code so that I can use that
value
> to determine what I send on my page?
> Thanks,
> Larry