.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Is it possible to pass textbox value as a parameter through hyperlink? Thanks

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :ASP.Net
Is it possible to pass textbox value as a parameter through hyperlink, with the press of a button or without? Thanks
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
       <br />
        <br />
        <br />
        <asp:Button ID="Button1" runat="server" Text="Button" />

        <asp:HyperLink ID="HyperLink4" runat="server" 
        NavigateUrl="~/ASPInvoiceGrid.aspx?PONumber={0}" Target="_blank">Invoice Details</asp:HyperLink>


View Complete Post

More Related Resource Links

How can I use a textbox text as a parameter to a hyperlink


I am using a hyperlink to link to another web form page. I am not able to pass the text of textbox as a parameter.

Thanks In advance, 

pass value from textbox to action, formcollection best way here?


Hi I'm building a e-commerce store and on quantity of product I'm going with a textbox. I thought I would ask how would you do this? a viewmodel to use a strongly typed textbox or just get the value of the textbox from the formscollection passed in to the action?

Thanks for any input

How to pass a parameter from a choice filter with project IDs to a KPI web part?



I have an excel pivot table like this:

Report Filter: Project ID
proj_name     Status 
A              70
B              60
C              80

I have this workbook published onto Sharepoint server through excel services.
On the site i have a choice filter that has all the project ID's. I am able to show this table in a web part and filter the web part by passing parameter from the choice filter to the report filter in the workbook as shown above.
I added a KPI webpart that uses the "status" from the above table as its indicator value. What I want to do is that I want to pass the parameter from the choice filter on the site to this KPI web part so that it will show me the corresponding status dynamically accoring to the project chosen.
Can someone help me solve this problem?

HyperLink use to send request parameter to another page


The statement is correct:

<asp:HyperLink ID="HyperLink2" runat="server" Text

How can I pass a parameter into my report?


I looked all over the forums, spent about a day on it, found numerous people having similar problems passing a parameter, but all the solutions I found so far were partially incomplete or incompatible to my project. I tried using a few of the "solutions" and they generated exceptions. I'm using straight ASP.NET so far with no c#. Is there a way to do it without code behind?

If someone suggests a solution I would be very grateful! Laughing I'm certain that if you provide a complete working example that others in the future will be very grateful as well.

Here is what I have thus far:

I used studio to create an .ASPX web form, and I used the report wizard to create a .RLDC file on the .ASPX page.

When I execute it, it works! Beautiful... Now how do I pass it a parameter?

So this is what I have below (which works), but I want to pass in a single int32 parameter to the stored procedure usprptGetData in which it is based.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyPage.aspx.cs" Inherits="My_Reports_Guarantor" %>

pass parameter between datasets



I've a user table, and contact table linked to it, and appointments where contact are linked to it with users in this in it.

I need a report which show ...by user number of contact created by this user and number of appointment created

so i guess i need two datasets but how can I pass parameters between them to know what is the current user id ..?

thanks so much  

How to Pass value to gridview parameter?

Dear all, I have grid view and i want to pass parameter value for it from where clause... my parameter value is not control, or session or cookie.its a variable ...how can i pass this variable to grid view parameter?   thanks 

How to pass current user's login name as parameter to a RDL . (SSRS integration with sharepoint)

I have a webmethod which has two parameters. One is for year and another is for Currently logged in user. I call this method in RDL file. From RDL File how can we pass Currently logged in user's login name? I tried  with USER!UserID. It is passing the USERID but i need to pass the login name(SPWEB.currentuser.loginname)  

How can i pass function as parameter to show in gridview

Hello, I have one common Data Access function which returns output as dataset which is as below   Public Shared Function ExecuteDataSet(ByVal sql As String, ByVal type As CommandType, ByVal ParamArray parameters As SqlParameter()) As DataSetDim RetVal As Object = Nothing   Try Cmd = Cmd.Connection = OpenConnection() Cmd.CommandType = type Cmd.CommandText = sql Cmd.Parameters.AddRange(parameters) Sda = Ds = Sda.Fill(Ds)       New SqlCommand()New SqlDataAdapter(Cmd)New DataSetCatch ex As ExceptionThrow New Exception(ex.Message.ToString())Finally CloseConnection() Sda.Dispose() End Try   Return Ds End Function   this function normally i use to get data from database and returns to dataset   now,I want to created one more function which output type is gridview and its parameter is  dataset which i got output in previous funtion   i want like this public funtion BindDatatoGridView(ExecuteDataSet("SELECT...",commandType.text,Parameter....)) as GridView End Function   how can i solve this, please help me out

Pass parameter to Hidden Field in SSRS Report

Hi, I have Two Columns in a Table Say As Table1 Column1 = Text Column2= id My SSrs Report has two parameter values as Column1 and Column2. Column2 should be hidden SELECT DISTINCT COlumn1 FROM Table1. i have passed this query dataset to Column1 parameter. Now My requirement is that, when ever column1 drop is selected. the hidden field column2 should fecth the corresponding ID. this column2 has Storeprocedure which will Display the Output when View Report button is clicked Thanks, Saraswathy

Pass ID parameter to other views

Hi, I'm new to MVC, so now I run into some problems, hope you can help!I took the MVC 2 template that comes with VS2010 and modified it to my needs. There are now 5 different tabs in the menu, I've implemented models and controllers and that works. But actually, the entire site should show data based on and ID (it pulls data from a webservice).For example account info for id=1: http://localhost:49925/AccountInfo/details/1This is always the URL where one enters the site (page will be linked to from another site, so the ID will be passed from there)So how can I pass the ID to the other Views (let's say I also have a 'Contact' tab: http://localhost:49925/ContactInfo/details/1 )I've solved it now by storing the ID as public property, so I can retrieve it in other Controller classes, but I think there must be a better way to do this.. Also I would like to have a title in the header of the master page that shows the current account (e.g. "Showing data for account FooBar"), how can I set this from the AccountInfo controller/model(?)

Any way to pass Multiple Values for a single Label in the Parameter?

  I have a Report that Contains 2 Parameters, @Customer & @Area. When trying to set up the Available Values for @Area, I'm having issues using multiple values for one Label, i.e. = "4006" Or "4610" One of the Filters in the Report is an Operation number, which is the [OPERATION] field, which is setup as a filter on the Tablix referencing the @Area parameter.  PROBLEM: I cannot retrieve any data when trying to use the ‘Or’ Operator here. If I simply put “4006” or “4610” I retrieve data, but when trying to combine it returns no data. Example, I need to allow a user to select ‘Chassis Incoming’, which would include data from Operations 4006 & 4610. QUESTION: Any way to pass Multiple Values for a single Label in the Parameter? I realize the typical solution may be to use ‘Multi-Value’ selection, but in this case we want the User to select the Area and the multiple values for Filtering will be automatically determined for them. Otherwise, they are subject to not getting it correct. I have tried several different ways, such as =”4006” Or “4610”, =(“4006”, “4610”), = In(“4006”, “4610”), etc….   Note: We are using Report Builder 3.0  

Report Parameter type for a list of Employees to prompt like AJAX Textbox intellisence when the user


Hi All,

I have around 300 employees report to run for a specific employee, I cannot have a Dropdown as it would be too long for the report user to choose from. Is it possible in SSRS 2008 to have a text box that would provide intellisence like AJAX textbox and provides user with Employee name to choose from database or is there any other better way to select the right mployee name to run this kind of report. being a newbie to SSRS I am unable to go furthur on this. All help is great help. Thanks in advance for responding.

Unble to pass date parameter to "Go to Report " ?


Hi ,

I have Report A need to go from Report A to Report B passing multivalued parameter and date parameter as well , I do not have any problem passing  Multivalued parameter but cant pass date parameter from Report A and Report B .

Report A : Date parameter properties

name : date

Data Type : Date/Time

Default value =Today()

Report B : Date parameter properties

name : date

Data Type : Date/Time

Default value =Today()

Go to Report action ,Expression used to pass date parameter  from Report A to Report B


Unable to pass appropriate date parameter if changed from default value from ReportA to ReportB .

Assistance would highly be appreciated !!

Thanks .

Rajkumar Yelugu

How to pass parameter to web page without displaying it?


Hello everybody.

The subject of the thread is my question. I don't know whether or not it is possible. Actually in my project currently I'm feeling a need to capture a bitmap image of a web page to insert that image into pdf document. And according to the need I don't want to display that page but want to pass values as parameters to that page. Is it possible? If so, how can I do it? Any information would be very helpful to me.

Thank you.

pass a dynamic parameter in a WCF method on HTTP GET


i have a WCF method with 2 known parameters and another one thats supposed to include a Key:Value pairs (dynamic parameter that will include an unknown number of key:value pairs).

the first question is :

i don't want to use XML as the dynamic parameter. what is the common way to pass the dynamic parameter in a WCF method? Dictionary<string,String>? json string? array of complex types? or other? ( my client - the one that uses my service, doesn't have Framework 3.5, so i suggested a framework 2.0 ways to send the parameter)

the second question :

the method  supports HTTP GET , should a dynamic parameter be passed in the URL itself or in the Header? i prefer the URL itself....


thank guys, please help ....

Can a textbox text be used as a parameter for a where clause


 I was wondering if there is a better way than what I am doing, if I want the text entered in the textbox to be the parameter of a where clause. I want to be able to display the records throught the gridview.




    <form id="form1" runat="server">
        <br />
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <br />
        <br />
        <br />
        <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Get_Details" />
            <asp:GridView ID="GridView1" runat="server" DataSourceID="AccessDataSource2">
  <asp:AccessDataSource ID="AccessDataSource2" runat="server"
     SelectCommand=  "SELECT PONumber,PartNumber,QtyOrdered,Units,QtyReceived,Description,UnitCost,ExtCost,ItemNote from ASPtbPOItem where PONumber=@TextBox1.Text">
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend