Solved

Pass values in Hyperlink to other page

Posted on 2006-07-12
10
844 Views
Last Modified: 2008-02-01
I have a hyperlink and need to pass 2 values from a page to be displayed on the different page (details.aspx page)

One value i want to send is selectedtext of dropdownlist and the other is in a textbox

<asp:hyperlink id="HyperLink1" runat="server" Width="120px" Target ="_blank" NavigateUrl="Details.aspx?">Add New Records

0
Comment
Question by:Junior_Developer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
10 Comments
 
LVL 18

Expert Comment

by:Elvio Lujan
ID: 17089808
in page_load:

HyperLink1.NavigateUrl = "Details.aspx?ddl="" + " & dropdownlist.clientid & ".value + ""&textbox="" + " & textbox.clientid & ".value"
0
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 17089901
in page_load:

HyperLink1.NavigateUrl = "Details.aspx?ddl=" &  dropdownlist.SelecyedItem.value & "&textbox="  &  textbox.text
0
 

Author Comment

by:Junior_Developer
ID: 17089918
this makes a little more sense let me try this
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 18

Expert Comment

by:Elvio Lujan
ID: 17089932
you can't use the pratima soluttion because you need to send the selected value in the moment when click the hyperlink... no in the page_load time
0
 

Author Comment

by:Junior_Developer
ID: 17090003
let me make it more clear what i want.
My dropdownlist has names of employees and i have to calling a stored procedure to get Ids of the selected employee.
i am calling a stored procedure to get ID's in dropdownlist _SelectedIndexChanged

Once this is done use can click on the Hyperlink and i want to pass the selected name in dropdown and the Id which i have as a string by calling the stored procedure.



0
 
LVL 18

Expert Comment

by:Elvio Lujan
ID: 17090028
did you try my solution posted?
0
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 500 total points
ID: 17090197
use
HyperLink1.NavigateUrl = "Details.aspx?ddl=" &  dropdownlist.SelecyedItem.value & "&textbox="  &  textbox.text

at the end og  dropdownlist _SelectedIndexChanged
0
 

Author Comment

by:Junior_Developer
ID: 17091787
thanks a lot
0
 
LVL 18

Expert Comment

by:Elvio Lujan
ID: 17091831
this don't work for you...

try to select before the item in the dropdownlist and after write the textbox text...
and then press the hyperlink...
in the next page... you'll get an empty value for textbox text
0
 

Author Comment

by:Junior_Developer
ID: 17091972
instead of the textbox i have stored the id in a string and did exactly like pramita_mcs said
here is what worked for me.

HyperLink1.NavigateUrl = "Details.aspx?EmpName=" & ddlEmpNames.SelectedItem.Value & "&EmpID=" & strEmpID

Thanks for all your help
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question