473,797 Members | 2,926 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Displaying a string var in the .aspx page

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.a spx?section=<#= section#>">

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

May 8 '06 #1
2 2025
Hi,

Try replacing the # symbols in "<#=section #>" with % symbols.

Doug

"mazdotnet" wrote:
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.a spx?section=<#= section#>">

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

May 8 '06 #2
<%=xxx%>

Daniel Fisher(lennybac on) | newtelligenceR AG
blog: http://staff.newtelligence.net/danielf
usergroup: http://vfl-niederrhein.net
-----Original Message-----
From: mazdotnet [mailto:ma****** *@gmail.com]
Posted At: Monday, May 08, 2006 3:39 PM
Posted To: microsoft.publi c.dotnet.framew ork.aspnet
Conversation: Displaying a string var in the .aspx page
Subject: Displaying a string var in the .aspx page

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.a spx?section=<#= section#>">

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

May 8 '06 #3

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

Similar topics

7
2346
by: Vinay | last post by:
Hi All: I have a small application that stores images either in the database or as files (depending on the user preference). I'm in the process of providing a web interface to this application. 1. If the images are stored in the DB then, every an image is requested, it will need to be pulled out and a temp file created and then displayed? What is the best way to do this?
0
1585
by: Wynter | last post by:
RE: from Displaying a Document using the ASPNET user account to the Client Browser discussion (3/2/2004 Buddy Thanks for helping me on getting the document to display. But now I am left with a second issue. While I was displaying the document as an attachment I end up with an extra window open or if I remove the Target='_blank' then my main window goes blank What I am doing is using the base code from...
2
3451
by: Carole MacDonald | last post by:
There have been lots of posts on this topic, but I haven't been able to apply any of the suggestions to my situation. I have an .aspx page with a form on it that has several submit buttons on it. Clicking a button will cause a web service action that returns XML. I would like to display this XML response on the page with the form. I know I can display XML in an IFRAME by pointing its source to an XML file. But I'm streaming the XML...
0
1728
by: Fronky | last post by:
Hope someone can help. I am still learning, so no laughing please. I am displaying records from a database using Response.Write(""); instead of the usual datagrid method. I am doing it this way to achieve the result I require. However. Since I have added a button to the screen, and have had to include the "object sender, System.EventArgs e", the Response.Write code has been appearing within the Documents_Table(null,null); tag on the...
3
2366
by: CLEAR-RCIC | last post by:
I have several images i want to display in an ASP.Net application. The images are being passed to me in binary format from another application. Is there a good way to write them directly to an HMTL page without having to save them to the server and create a URL to the virtual directory? FYI: I currently am doing this with just single images. I do a Response.BinaryWrite(byte) to display the one image. The advantage is that I never...
7
1899
by: mosipenko | last post by:
I have a website that has articles and images. The articles are stored in one table, and if they have an image associated with them, it's stored in another table with a common id linking them. I can pull all the information fine into labels, and if the ImagePath field is NULL, then it just doesn't show up. My problem is that when I'm trying to display the images, I get a "Conversion from type 'DBNull' to type 'String' is not valid" error...
15
1518
by: Kevin Hanken | last post by:
Hi, Pretty much a newbie to aspnet and xp -- I am using XP Pro, Service Pack 2. I installed IIS, set up a virtual directory, created an aspx file and pasted in a little code from the w3schools site and then tried viewing the page using my localhost. The aspx page loads, but the little aspnet script asking to write the NOW function -- won't display. Since I copied it from w3schools, I am assuming
7
2409
by: hsegoy1979 | last post by:
Dear All Iam using file upload control and i want to display image in another pop up page .But image is not displaying in image control iam sending image path thru querystring . here is my code <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html...
7
6673
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a tabcontainer which has 1 panel already, however I want to try create the TabPanels dynamically. I followed the advice here: http://www.asp.net/learn/ajax-videos/video-156.aspx (3rd comment - Joe Stagner)
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10468
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10245
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9063
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7559
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4131
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.