473,386 Members | 1,832 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,386 software developers and data experts.

Inline code prevents Design view

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

<input type="hidden" name="fmFirstName" value="<%=Session("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 1671
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*****@removefornospammers.smsu.edu> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I have a page with some inline server-side code. An example line is:

<input type="hidden" name="fmFirstName" value="<%=Session("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="fmFirstName" value="<%=FirstName%> ">
"Ken McCrory" <kl*****@removefornospammers.smsu.edu> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
| I have a page with some inline server-side code. An example line is:
|
| <input type="hidden" name="fmFirstName" value="<%=Session("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="fmFirstName" value='<%=Session("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="fmFirstName"
value="<%=Session("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_spam_too> wrote in message
news:62*********************@msnews.microsoft.com. ..
Change to using single quotes:

<input type="hidden" name="fmFirstName" value='<%=Session("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="fmFirstName"
value="<%=Session("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
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...
2
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...
6
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...
0
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...
8
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...
4
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...
4
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...
5
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...
37
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.