473,320 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

code in .aspx page and not in the code-behind

Hi,

I have the following code in the code-behind file

public string section;
section = Request["section"].ToString()

and I like to display it in my .aspx page (included .ascx) but it's not
working.

I tried
<a href="default.aspx?section=<#=section#>">

is it possible to just place Request["section"].ToString() in for ex.
default.aspx?section=Request["section"].ToString() ????
Thanks
MA

May 8 '06 #1
1 1077
MA,

In the page, you would have to do something like this:

<a href="default.aspx?section<%= (string) Request["section"] %>">

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<ma*******@gmail.com> wrote in message
news:11**********************@j73g2000cwa.googlegr oups.com...
Hi,

I have the following code in the code-behind file

public string section;
section = Request["section"].ToString()

and I like to display it in my .aspx page (included .ascx) but it's not
working.

I tried
<a href="default.aspx?section=<#=section#>">

is it possible to just place Request["section"].ToString() in for ex.
default.aspx?section=Request["section"].ToString() ????
Thanks
MA

May 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Colin | last post by:
Hi there, I really need your help on this. I'm trying to learn to using the VS.2003 to create a User Control. In my aspx code has no problem to use the property "grossWaye" that has "register" in...
3
by: Bishoy George | last post by:
Hi, I want an asp.net code for redirection: I have multiple domains pointing to one page , let's call it page0.aspx I want to put a code in page0.aspx so when domain1 opens page0.aspx it...
1
by: Spyros Sakellariadis | last post by:
I have a standard aspx page format that I replicate in many places on my site. That page has a lengthy page_load section, that I'd love to stick in a single code file (e.g. MyFunctions.vb). I know...
9
by: JohnSmith | last post by:
I suspect this is easy, but I have been stumped for a day trying to solve this.. I want to be able to have an unlimited number of aspx pages that all use the code in one class file. I want code...
1
by: D A H | last post by:
I have gotten the same exception in multiple projects. I have solved the underlying problem. My question is if anyone knew of a setting that would cause this exception to be thrown. A...
2
by: | last post by:
I have a breakpoint in an aspx page that I'm using to try to trap some code to see what's going on. I'm translating a page that is working in a traditional ASP page, which takes several session...
7
by: tonelab | last post by:
I have an aspx page that does not have a separate source for the VB - it is on top in between the <script> tags. I use the following statement Dim oComLib as New ComLib To reference a class...
3
by: Lucky | last post by:
Hi guys! it's me againe! this time i'm facing some problem with the .NET 2005 IDE. i've created one "website" and i've added one webform. now i can see 2 files default.aspx and default.aspx.cs...
2
by: farhad13841384 | last post by:
Hi , I Hope You fine. I have some problem with this code for paging in asp.net this bottom code work correctly without any error but when I try to place separate code in .VB file then error is...
13
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.