473,657 Members | 2,721 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inline code prevents Design view

I have a page with some inline server-side code. An example line is:

<input type="hidden" name="fmFirstNa me" value="<%=Sessi on("FirstName") %> ">

The code and logic works and does what it is supposed to do BUT if I try to
change from HTML view to Design view I get this error message:

Could not open in Design view. Quote values differently inside a
'<%..."value".. .%>' block.

How should I quote the value block so I can use Design view and still have
it work? Single quotes didn't work. Right now when I want to see design view
I comment out the lines with inline code.
--
Ken "BiggMakk" McCrory
Nov 19 '05 #1
4 1691
dont use the inline. Add a runat=server or use a server based control and
populate it from the codebehind.

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Ken McCrory" <kl*****@remove fornospammers.s msu.edu> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
I have a page with some inline server-side code. An example line is:

<input type="hidden" name="fmFirstNa me" value="<%=Sessi on("FirstName") %>
">

The code and logic works and does what it is supposed to do BUT if I try
to change from HTML view to Design view I get this error message:

Could not open in Design view. Quote values differently inside a
'<%..."value".. .%>' block.

How should I quote the value block so I can use Design view and still have
it work? Single quotes didn't work. Right now when I want to see design
view I comment out the lines with inline code.
--
Ken "BiggMakk" McCrory

Nov 19 '05 #2
in design view Session is null, so an error is thrown when it is accessed.
add a property accessor in the codebehind

string FirstName {
get {
if (Session != null)
return Session["FirstName"];
return "";
}
}

then in the aspx:

<input type="hidden" name="fmFirstNa me" value="<%=First Name%> ">
"Ken McCrory" <kl*****@remove fornospammers.s msu.edu> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
| I have a page with some inline server-side code. An example line is:
|
| <input type="hidden" name="fmFirstNa me" value="<%=Sessi on("FirstName") %>
">
|
| The code and logic works and does what it is supposed to do BUT if I try
to
| change from HTML view to Design view I get this error message:
|
| Could not open in Design view. Quote values differently inside a
| '<%..."value".. .%>' block.
|
| How should I quote the value block so I can use Design view and still have
| it work? Single quotes didn't work. Right now when I want to see design
view
| I comment out the lines with inline code.
| --
| Ken "BiggMakk" McCrory
|
|
Nov 19 '05 #3
Change to using single quotes:

<input type="hidden" name="fmFirstNa me" value='<%=Sessi on("FirstName") %>'>

-Brock
DevelopMentor
http://staff.develop.com/ballen
I have a page with some inline server-side code. An example line is:

<input type="hidden" name="fmFirstNa me"
value="<%=Sessi on("FirstName") %> ">

The code and logic works and does what it is supposed to do BUT if I
try to change from HTML view to Design view I get this error message:

Could not open in Design view. Quote values differently inside a
'<%..."value".. .%>' block.

How should I quote the value block so I can use Design view and still
have it work? Single quotes didn't work. Right now when I want to see
design view I comment out the lines with inline code.


Nov 19 '05 #4
BINGO! We have a winner! The other two methods mentioned in other posts may
work and may even be the preferred way but this method was the quickest and
still works. Thanks Brock!

--
Ken "BiggMakk" McCrory

"Brock Allen" <ba****@develop .com.i_hate_spa m_too> wrote in message
news:62******** *************@m snews.microsoft .com...
Change to using single quotes:

<input type="hidden" name="fmFirstNa me" value='<%=Sessi on("FirstName") %>'>

-Brock
DevelopMentor
http://staff.develop.com/ballen
I have a page with some inline server-side code. An example line is:

<input type="hidden" name="fmFirstNa me"
value="<%=Sessi on("FirstName") %> ">

The code and logic works and does what it is supposed to do BUT if I
try to change from HTML view to Design view I get this error message:

Could not open in Design view. Quote values differently inside a
'<%..."value".. .%>' block.

How should I quote the value block so I can use Design view and still
have it work? Single quotes didn't work. Right now when I want to see
design view I comment out the lines with inline code.


Nov 19 '05 #5

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

Similar topics

14
2771
by: Chris Mantoulidis | last post by:
I am not clear with the use of the keyword inline... I believe you add it do a function when you implement the function inside the header file where the class is stored... But is that all? What am I missing? If that's all, then why did Bjarne even bother adding it to the language? If that's not all, what else can I do with "inline"?
2
1933
by: Tools | last post by:
WinTranslator & MacTranslator Demo Editions Generate Design Diagrams from Your Source Code in Minutes Placitas, NM ? April 5, 2004 - Excel Software is pleased to announce the immediate availability of Demo editions of its WinTranslator and MacTranslator reengineering tools. When used in conjunction with the WinA&D or MacA&D modeling tools, software developers can automatically generate live diagrams that represent the design of their...
6
3996
by: RainBow | last post by:
Greetings!! I introduced the so-called "thin-template" pattern for controlling the code bloat caused due to template usage. However, one of the functions in the template happens to be virtual as well. To support thin-template, I need to make virtual function as inline. Now, I know that compiler would generate an out-of-line copy when it
0
548
by: srivalli chavali via DotNetMonster.com | last post by:
Hi. I have a PDF file and a MHT file. Following is the code I'm using to read the file and display it INLINE in the browser. PageData is a MemoryStream object that contains the file's actual stream of bytes. ---------------------------- PDF files ---------------------------- Response.ContentType = "application/pdf";
8
1748
by: neilmcguigan | last post by:
I just wanted to list some reasons why I prefer inline code to code-behind. 1. you can fix some bugs more quickly. remote desktop into server, change the aspx file, and she's good to go. I'd say this is one of the major reasons classic ASP became so popular. 2. don't have to upload the large codebehind site DLL to fix one bug. 3. updating the codebehind site DLL restarts the application. fixing
4
1746
by: anton.hopen | last post by:
ASP.NET 2.0 master pages are great. However, I want to edit an ASPX page in FrontPage for aesthetic styling reasons. The ASPX page is linked to a master page so it naturally has a contentplaceholder ID. Right-click in VS2005 and open it in MS FrontPage. Source appears file. However, design view (the real reason I'm in FP anyway) will not display unless I remove the ContentPlaceHolder tag. Specifically: <asp:Content ID="Content1"...
4
2936
by: Aaron Gray | last post by:
Hi, I want an "isZZZ" variable that I can use to generate "display: -moz-inline-box;" rather than "display: inline-block;" but in DOM. For this I need to know what version of Mozilla this "feature" was added and also how to detect Mozilla as a userAgent. Alternatively is there an alternative to "display: -moz-inline-box" for sticking two tables side by side ?
5
1923
by: sunil | last post by:
Hello, I have a class deriving from a class that provides ability to serialize/deserialize objects over the network. There are two classes Requests (sent from client to server) Response(sent from server to client), these two classes need to implement a pure virtual method called dispatch(), however only client needs to implement Response::dispatch() and only server needs to implement Request::dispatch(). I am planning to build a library...
37
3654
by: Prisoner at War | last post by:
Actually, it doesn't have to be a blockquote...but I'm at my wits' end: I want to make bold several lines of text which have a pair of <br /tags between them...seems like the <b></bdo not "carry over" when there are <br /tags involved...??? I've tried using <p style="font-weight: bold;"></p>, I've tried <blockquote></blockquote>...I just can't figure how I'm supposed to get the <b></btags to work for all the lines! Surely there must be...
0
8382
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
8297
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
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
8717
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
7311
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
6162
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
5629
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();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1600
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.