Tracking Forums, Newsgroups, Maling Lists
Home Submit Tracker Forums
  Advanced Search


How To Get Parameter In Url ( By C# For .net)

I would like to get parameter ofASP.NET script in URLexample : /localhost/example.asp?parameter1How can i to gethis parameter ?can you give me a example? ( using C#)

View 27 Replies (Posted: Feb 07, 2007 04:39 AM)

Sponsored Links:

Related Forum Messages For ASP.NET category:
SQL Reporting :: MDX Query Parameter From SSRS / Setup @from And @to As Parameter But Not Working?
I've a MDX Querythat has where clause as shown below.I'm designing report using SSRS 2008. How can i pass date as parameter? I tried to setup @from and @to as parameter but not working?

WHERE ( {[Date Central].[Calendar Date].[2010-04-01 00:00:00]:[Date Central].[Calendar Date].[2010-08-30 00:00:00]} )

need it to work as
WHERE ( {[Date Central].[Calendar Date].[@From]:[Date Central].[Calendar Date].[@To]} )

Posted: Aug 21, 2010 04:38 PM

View 1 Replies!   View Related
SQL Reporting :: Change Parameter Property After Selecting Another Parameter?
Is it possible to change a parameter's property after the uer has made a selection or filled in another parameter field? I'm using VS2005


- 3 parameter fields; Country,Station,Carrier all three are textfields andare allowed to stay 'blank'.

- When the user enters a Country-code in the 'Country' parameter field, the 'Carrier' parameter should become a required field.

I did some searching on the net, but haven't found the solution. I started to wonder if it's actually possible?

Posted: Oct 19, 2010 12:30 PM

View 6 Replies!   View Related
SQL Reporting :: Parameter Enabling Based On Selection In Another Parameter?
I have a parameter Owner with 1,2,3 options in dropdown.

On selection of option 1 , a country parameter should be enabled with all countries' values defaulted.

Option 2 should enable Region parameter with all the Regions values selected and country parameter should be displayed.

Option 3 should disable both Region & Country Parameter.

I am using SSRS 2005 with Enesys tool as add on.

Posted: Nov 12, 2010 02:46 AM

View 2 Replies!   View Related
SQL Reporting :: Create Another Parameter That Acts A Filter For The Other Parameter?
One of our customers has a report with a single value string parameter that has over 1000+ possible values. selecting single value from 1000+ choices results in bad UI, among other things.create another parameter that acts a filter for the other parameter. So you would have Param1 with say 25 choices and selecting a choice would narrow down the option for the second parameter.Is this the best way. What is the best practice for handling these kinds of parameters?

Posted: Jun 26, 2010 02:01 AM

View 5 Replies!   View Related
Forms Data Controls :: Setting The ID Parameter To Form Parameter Source And Have Entered The Grid Views Name In The Form Field
How do you use the http POST method with a Grid View on another page. I am trying to use the POST method to send the ID from the selected row of a Grid View, I am using a link button set to fire the select command and it has the Post Back URL set, from one page and then retrieve the ID value on another page using an Object Data Source. Also, under the Defining Parameters, I am setting the ID parameter to Form Parameter Source and have entered the Grid Views name in the Form Field.

Posted: Mar 11, 2010 09:55 AM

View 4 Replies!   View Related
SQL Reporting :: Datetime Parameter In SSRS 2005 Error "Failed To Convert Parameter Value From String To DateTime"
I am stuck with one issue in SSRS.I have one SP(sql server) that takes Datetime as input parameter. In my report i added one Report Parameter as Datetime and checked Allow Null values and when i run the report its throwing me an error telling that " TITLE: Microsoft Report Designer

An error occurred while executing the query. Failed to convert parameter value from a String to a DateTime. ADDITIONAL INFORMATION: Failed to convert parameter value from a String to a DateTime. (System.Data) String was not recognized as a valid DateTime. (mscorlib) "

ALTER PROCEDURE [dbo].[usp_Search_SSRSReport](
@Servicer_Loan_Number varchar(50),
@Completed_Date datetime=NULL,
@Doc_Review datetime=NULL
SET @strSQL = 'SELECT P.Servicer_Loan_Number,P.POOL_ID,P.OrderID,P.Borrower_First_Name+'' '' + P.Borrower_Last_Name AS BWRName,
P.Mailing_Address+ CHAR(10) +P.Mailing_Address_City+'',''+P.Mailing_Address_State+'' ''+P.Mailing_Address_Zip AS Mailing_Address,
P.Property_Address+ '','' +P.Property_Address_City+'',''+P.Property_Address_State+'' ''+P.Property_Address_Zip AS Property_Address,
D.Completed_Date,D.Recall_Status,D.Expired_Status,D.Doc_Review ' +
' FROM dbo.Processing(NOLOCK) P,dbo.Document_Exception(NOLOCK) D ' +
' WHERE P.Servicer_Loan_Number=D.LoanNumber '
if(@Servicer_Loan_Number is not null) and (@Servicer_Loan_Number != '')
SET @strSQL = @strSQL + ' AND P.Servicer_Loan_Number = ''' + @Servicer_Loan_Number + ''''
if(@Completed_Date is not null) and (@Completed_Date !='')
SET @strSQL = @strSQL + ' AND convert(varchar(11),D.Completed_Date,101) = ''' + convert(varchar(11),@Completed_Date,101)+ ''''
if(@Doc_Review is not null) and (@Doc_Review !='')
SET @strSQL = @strSQL + ' AND convert(varchar(11),D.Doc_Review,101) = ''' + convert(varchar(11),@Doc_Review,101)+ ''''

Posted: Sep 21, 2009 08:37 PM

View 2 Replies!   View Related
Parameter Count Does Not Match Parameter Value Count?
We're getting a server error saying "Parameter count does not match Parameter Value count." Anyone have any idea what this could mean?


Our site's on ASP.NET Webforms running DotNetNuke as a CMS.

I've tried uploading an older version of the web.config file but it doesn't seem to have changed since the error came up. It wasn't in any of our recent module file uploads because I reuploaded the old files from this morning that we changed.

Could any changes in the database cause this or would it have to originate from an error in the code?

Posted: Apr 21 10 at 19:48

View 2 Replies!   View Related
MVC :: Way To Use More Than 1 Parameter In URL
Ive seen tutorials showing URLs that takes 1 parameter (e.g:http://localhost/nerddinner/edit/10).Which means that 10 is the edit method argument,however,i want to pass a second parameter,how can i do that?I tried http://localhost/nerddinner/edit/10&250 but it failed.

Posted: Jun 30, 2010 10:53 PM

View 3 Replies!   View Related
How Can Pass Parameter In C#

Posted: Feb 09, 2010 09:17 AM

View 3 Replies!   View Related
C# - How To Pass Parameter In CSS
i have a grid with an image column, i want to change images based on data source. if data field for a row is 2 then image will be *.gif and if it is 3 then will be different so it is not fixed that which type of images we will have so i want to do "if..else" on css because in that case we can easily change images on css. i don't want code on code behind file.

Posted: Feb 1 at 8:44

View 2 Replies!   View Related
Mvc Routing Id Parameter
I am working on a website in mvc. I have a route

"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
ew { controller = "Home", action = "Index", id = UrlParameter.Optional }

Posted: Apr 30 10 at 8:30

View 4 Replies!   View Related
ADO.NET :: How To Supply A Parameter
Procedure or function 'Inser1' expects parameter '@CustoemrID', which was not a parameter for binding a gridview

Posted: Dec 16, 2010 12:59 PM

View 4 Replies!   View Related
Add Some Description Against Each Parameter
I have written a function and want to add some description against each paratemeter it takes, how can i do this in


Posted: Oct 26, 2010 09:28 AM

View 2 Replies!   View Related
Web Forms :: Hw To Get Url Into Parameter
I am making a web post on my website and I need to get the url ("PageID") to link the post.I need to get what's in bold in this code.


Posted: Jul 01, 2010 04:36 PM

View 3 Replies!   View Related
Navigating Through Url With Parameter?
I am using ssrs2005.Iwanted to navigates to another report through Jump to Url option. I have another parameterized report (to which I want to navigates). Paramtere are of different datatypes and one of them is null. When I am passing below link I get type mismatch error.


Posted: Jan 12, 2009 03:16 AM

View 1 Replies!   View Related
How To Pass A Url As A Parameter
'm constructing a url which in itself has a url, and both are parameterised.E.g. string postUrl = "target_page.aspx?url=post_page.aspx?p1=9&p1=9&post_type=1he url and parameters in bold are the inner url so when i refer to querystring parameter 'url' I want it to bring backurl=post_page.aspx?p1=9&p1=9 and not url=post_page.aspx.hat should I encode and to ensure this comes out correctly

Posted: Apr 03, 2010 12:35 PM

View 1 Replies!   View Related
MVC :: How To Request Parameter URL
I need to edit URL like this I want to pass new variable and request it from URL.

Posted: Jun 21, 2010 09:02 AM

View 10 Replies!   View Related
MVC :: Way To Access The Url Parameter
what is the code to access the parameter sent to a view by the urlif i have a url say .../home/index/3the 3 is passed as a variable called id in the controllersay the controller returns a list where all the ids = 3 (in this case) and that list returns no values, i then cant get the value of id from the model because it is emptyI think i would need to get it from the url but i dont know the code to do that

Posted: Feb 28, 2011 04:00 PM

View 6 Replies!   View Related
Get Session Value Into An Parameter Tag?
I have following code

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
UpdateCommand="UPDATE [gMeter] SET ... [userId] = @userId ...

I need to parametr @userId assign session variable Session["userId"], I tried

[userId] = <%= Session["userId"]%>

But it does not works.

Posted: Sep 27 10 at 13:20

View 1 Replies!   View Related
Can Pass Parameter In Tag's Src
i want to pass parameter in image tag's src.

i send an image in email, for email tracking but i want to pass parameter in image tag's src.

message.Body = "<img src=' + System.DateTime.Now + &campID='32434'/>";

Posted: Mar 26, 2011 11:36 AM

View 7 Replies!   View Related
SQL Reporting :: Get Parameter Name In Rdl?
Ho to loop and list all parameter in the rdl report

Posted: May 31, 2010 08:08 AM

View 1 Replies!   View Related
MVC :: Passing Id In Parameter?
I am usingurl in my mvc application like /product/edit/5, should change it because users can

change id parameter and access differentproduct as this Id directly refer to Id in product table, I have validation there for user to access product.

should I continue with it or should I change it as application has many users

Posted: Aug 26, 2010 12:19 AM

View 2 Replies!   View Related
ADO.NET :: Give A Parameter Value?

i have written this code in a Class for enter date in data base using gridview And following code is written in aspx.cs page on button click but i do not know what value pass in st.insert(..........)


Posted: Dec 03, 2010 05:50 AM

View 1 Replies!   View Related
C# Run A Procedure Without Specifying A Parameter Name?
How can I execute a stored procedure that takes in parameters without having to specify the prameters name? The name of the parameter in the stored procedure may change from CustomerID to CustID so I don't want to have to keep changing my code.Rather than doing what is provided below where you specify the parameter name -
command.Parameters.Add("@dtStart", SqlDbType.DateTime);
command.Parameters["@dtStart"].Value = startDate;
command.Parameters.Add("@CustomerID", SqlDbType.NChar);
command.Parameters["@CustomerID"].Value = customerID;

I am looking to do something like this -

command.Parameters.Add(startDate, customerID);

Posted: Mar 3 at 14:08

View 5 Replies!   View Related
MVC :: Get Parameter Value In View?
i have url like


and i want to use id given above in my action link.

Posted: Oct 16, 2009 06:18 AM

View 4 Replies!   View Related
C# - HttpSessionState As Parameter
What is the highest class in the hierarchy I can use to pass HttpSessionState as a parameter and add values to it?

For instance to a method like

public void MyMethod(IDictionary<string, object> input)
input.Add("something", something);

I see that implements ICollection and IEnumerable, but that only allows me to read values, not add them.

Posted: Mar 24 10 at 4:04

View 1 Replies!   View Related
How To Start Threading With Parameter
i want to learn how can i start threading with parameter?

This is simple methods : (without parameter)

ThreadStart ts1 = new ThreadStart(UpdateAndInsertDbase);
Thread t1 = new Thread(ts1);
ThreadStart ts1;

This is complex form : (with parameter)

Thread t1 = new Thread(new ThreadStart(new UpdateAndInsertDbase(
new WaitCallback(UpdateAndInsertDbase), NessusID, Split1, Split2, spenglish, spturkish, conn)));

But this does not work well.

whole codes here

. . . . . .
. . . .
. . .
. .
Thread t1 = new Thread(new ThreadStart(new UpdateAndInsertDbase(
new WaitCallback(UpdateAndInsertDbase), NessusID, Split1, Split2, spenglish, spturkish, conn)));
void UpdateAndInsertDbase(string NessusID, string[] Split1, string[] Split2, string spenglish, string spturkish, string conn)
progressBar1.Minimum = 1;
progressBar1.Maximum = Split1.Length;
TableFromSQL sql = new TableFromSQL();
for (int i = 0; i < Split1.Length; i++)
progressBar1.Value = i + 1;
sql.AddToDbase(spenglish, conn, NessusID, Split1[i]);
for (int i = 0; i < Split2.Length; i++)
progressBar1.Minimum = 1;
progressBar1.Value = i + 1;
sql.AddToDbase(spturkish, conn, NessusID, Split2[i]);
sql.UpdateToDbase("sp_UpdateDbaseAll", conOwn);

i want to learn multithread with parameter.

Posted: Dec 31, 2008 12:36 PM

View 1 Replies!   View Related
Want To Add Parameter In May Correct URL When Page Run?
i have a page named default.aspx. i want to add parameter in may correct URL when my page run (in page_load method)

Posted: May 23, 2009 08:44 AM

View 3 Replies!   View Related
How To Display Parameter In A Pie Chart
My pie chart displays data from a dataset properly right now. What it displays is a sum of materials for a day, grouped by material name.

For example:

LTV - 5000 pounds - 1/1/2010
LTV - 4000 pounds - 1/1/2010
HAT - 2000 pounds - 1/1/2010
HAT - 2200 pounds - 1/1/2010

It sums by material. So in essence I have 9000 LTV and 4200 HAT. The piece that I am missing that I need to add is the "empty space" available. The empty space is simply the Capacity minus the totals above. So if the total capacity is 15,000, I need to take 15,000-13,200(totals of LTV and HAT above) and add 1800 "empty space" to the pie chart.

As I said before, the pie chart works fine displaying the sum of the materials. I have added a parameter to the report with static capacity numbers. How would I subtract the totals of LTV and HAT from the Parameter and display that number on the pie chart? This was all done with the designer as well so far.

Posted: Sep 21st, 2010, 10:30 AM

View 3 Replies!   View Related
Redirect While Keeping # Parameter In VB.NET?
For my website, we have various content pages that bring up specific data based on a passed in # parameter, such as this:


We're consolidating some pages, but we still have external sites such as twitter and facebook that link to older pages. I want to setup those old pages to redirect to the new ones while keeping the # parameter if possible.

For example if a twitter link goes to:


I want it to redirect to:


I tried using:


but none of them seem to return the #parameter information.

Posted: Aug 20, 2009, 14:28

View 5 Replies!   View Related
Finding The Value Of A Querystring Parameter
I am trying to find the value of a querystring parameter and associate it with a predetermined email. If the value of parameter "i" equals 1 then iEmail= "". I then am sending the info to a DB, an email is sent and the page is redirected. I am losing or not capturing the iEmail value and therefore the data is not being inserted into the DB and the page is not redirecting.

Can someone look to see what it is I am doing wrong?


Posted: Feb 24, 2009, 16:51

View 3 Replies!   View Related
What Should The Int Size Be For A Int32 In A CMD Parameter
What should the int size be for a Int32 in a CMD parameter


Posted: Feb 08, 2011 05:26 PM

View 1 Replies!   View Related
Set Parameter In Crystal Report?
I have create a web page where user enter two date and the report will all required data in the report which are in between two date. It works properly. I want to show two dates entered by the user in report header. How can I do it?

Posted: 1 Week Ago

View 1 Replies!   View Related
Checkbox According To Boolean Parameter?
I'm not a programmer. I'm afraid my question will be hilariously easy to ASP.NET programmers. Actually, I hope it will be. In a .aspx file I'm trying to have a checkbox checked or unchecked based upon a parameter. I managed to find out which parameter I need and I can get in on screen with


Output is either true or false. Next I've been trying in every possible way I could think of to set the CHECKED flag using this getShowHints() return value. I guessed something like this would have worked:


It doesn't.

Posted: Sep 14 09

View 4 Replies!   View Related
Web Forms :: Url Parameter Encryption?
I have a URL like this: [URL]How it could encrypt and decrypt the parameters of a URL ?. how to achieve this task

Posted: Aug 04, 2010 11:45 AM

View 5 Replies!   View Related
How To Write A Parameter For The Function

and I want to call this Button2_Click from my code, what should I write as parameters of this function?

Posted: Feb 09, 2010 04:08 PM

View 3 Replies!   View Related
MVC :: How To Handle A Routing Parameter
This is more of an ASP.NET Routing question than an ASP.NET MVC question, but any guidance on how to handle a routing parameter with a / in it? For example, say that I am creating a website to show Northwind information and I have a URL pattern like:


Which shows the products in the category CategoryName. I have a page that lists all categories with each category name a link to the above URL pattern. I use the RouteCollection object's GetVirtualPath method, specifying the route name to use and the category name value. Problem is, some of the category names have forward slashes in them (/), like "Meat/Produce". The net effect is that the URL generated for the Meat/Produce link is:


My workaround has been to create a helper method that I call that replaces all forward slashes with dashes before calling GetVirtualPath, the net result being that the URL gets changed to:


Then in my RouteHandler class I do the reverse, replacing - with /, before doing the database query to get information about the category in question.

This feels hokey. Is there a better approach, something built into the ASP.NET Routing system to handle such scenarios?

Posted: Apr 30, 2009 03:05 PM

View 18 Replies!   View Related
Value Cannot Be Null, Parameter Name Source?
I have this code in my code behind class. I keep getting this error that "Value cannot be null, parameter name source"


Posted: Mar 14, 2011 06:45 PM

View 8 Replies!   View Related
Value Cannot Be Null In Parameter Name Entity

If this information does not exist in the table displays this error:Value Can not BE null. Parameter name: Entity

Posted: Sep 18, 2010 07:34 PM

View 3 Replies!   View Related
Copyright 2005-08, All rights reserved