views:

90

answers:

2

i'm generating HyperLinks, all of them (depending on the circunstance, could be 1, 2 or 1000) send to the same webform:

from default.aspx to envia.aspx

i can't use session, or anything i already know, because i can't create as many methods i want (that would not be good, due to possible large numbers)

example, there are three lines i print on demand:
house [link]
car [link]
flower[link]

i want the three links to load the same aspx webform sending as a parameter a string with these lines.

i don't care if the answer is in vb.net or in c#, anything you could help it's ok (i'm using vb.net though)

+4  A: 

can you use Query String?

envia.aspx?param1=something&param2=somethingelse

in envia.aspx:

string param1 = Request["param1"];
string param2 = Request["param2"];
Marek Karbarz
There is a limit on what the size of the querystring can be so if he has thousands of links, this will choke.
nickyt
256 character you can send into querystring .. it is a maxlimit of querystiring
Sikender
i won't send lots of parameters, just one, but i have to be able to send one of lots of parameters.
MarceloRamires
no .. only 256 character only.. i give. you example. wait a min
Sikender
Response.Redirect("Edit.aspx?eid="+ e_id + "
Sikender
give me reply.. if you dont get it . or get it.
Sikender
hey, it worked! thank all of you guys very much! this is my first programming question in stack overflow that comes to a solving thanks to you guys!if i could i'd vote it up, but i have no reputation.. i guess my questions are too noob for someone to find them interesting and i can't answer many yer =(Thanks again!
MarceloRamires
@nickyt - it doesn't matter if he has thousands of links as long as each link doesn't have a querystring above the limit, so I'm not sure what your actual point is
Marek Karbarz
@Marek - I misunderstood his question. I thought he was putting thousands of items in the querystring of one url.
nickyt
ahh, in that case it would indeed be a bad solution
Marek Karbarz
A: 

What about crosspage postbacks? Only used it once, but this sounds like a good candidate for it. See Cross-Page Posting in ASP.NET Web Pages, http://msdn.microsoft.com/en-us/library/ms178139.aspx

nickyt
how do i use it ?
MarceloRamires
well, it worked, used querrystring! thanks!
MarceloRamires