Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 08-06-2009
Member
 
Join Date: Apr 2009
Posts: 105
Expression cannot be evaluated while in design mode

Whenever i try to run a public shared function in order to test out (CTRL-G), it gives out the following error message "Expression cannot be evaluated while in design mode" on my desktop screen. Can any body tell me that how can i test my function on my pc? Does any body knows about it? Kindly provide me the correct solution for the above issue. Any kind of help on the above issue would be appreciated.
Reply With Quote
  #2  
Old 08-06-2009
Member
 
Join Date: Apr 2008
Posts: 1,948
Re: Expression cannot be evaluated while in design mode

In order to execute a function at design time, you need to follow the below steps mention.

1) Try to copy the following code into a Visual Basic console application:

Quote:
Module Module1

Sub Main()
MyFunction(5)
End Sub

Function MyFunction(ByVal input as Integer) As Integer
Return input * 2
End Function

End Module
2) Then you need to go on the Debug menu, then clickon Windows, and then you need to click on Immediate.

3) Then you need to type "?MyFunction(2)" on the Immediate window and then press teh Enter key.
Reply With Quote
  #3  
Old 08-06-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
Re: Expression cannot be evaluated while in design mode

In order to change a variable, you need to select View-->Other Windows-->Command Window from the IDE menu, then enter 'immed' after the prompt in the command window. Then you can use commands from the current development language by just typing in the command and pressing the Enter key.
Reply With Quote
  #4  
Old 08-06-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: Expression cannot be evaluated while in design mode

Try out the following steps:-

1) Try to Set a breakpoint at Protected Sub Page_Load.

2) Then try to execute the page in a debug mode.

3) Then when the breakpoint is hit, in the Immediate window, you need to type in the following command:
Quote:
? request.ServerVariables("script_name")
4) Then press the enter key. Then you would see the name of the script that you are trying to executing in the Immediate window.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Expression cannot be evaluated while in design mode"
Thread Thread Starter Forum Replies Last Post
How to Turn on and off Design mode in Microsoft Excel 2007 Kaesav MS Office Support 2 05-01-2012 05:53 PM
Modeling and composing objects in Expression Design Xiomar Windows Software 3 28-11-2010 02:33 AM
How to resize the document in Expression Design Xanty Windows Software 6 28-11-2010 12:37 AM
Pass query in design mode in Access 2007 Chandranath Windows Software 5 08-01-2010 06:45 AM
How to use expression to design resources in silverlight applications Brunoz Software Development 3 28-07-2009 09:15 AM


All times are GMT +5.5. The time now is 08:36 PM.