Solved

Where can I find defaultclientscript property in Visual Studio 2005

Posted on 2010-08-28
17
273 Views
Last Modified: 2012-05-10
I am trying to run through a tutorial for Web Forms in VS 2005. In part of the tutorial I need to view the Properties Explorer, select DOCUMENTS and change the defaultclientscript property to VBscript.

All pretty simple, except I have no defaultclientscript property listed for the DOCUMENT. Has something changed in VS 2005, is there a settng somewhere which I need to change so the defaultclientscript property is available, or is this property located somewhere else??

0
Comment
Question by:NathanIrwin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 7
  • 2
17 Comments
 

Expert Comment

by:kapiltapa
ID: 33548627
The DefaultClientScript is now a DOCUMENT property under VS 2005 (VWD). The
html equivalent is either on of these:

<meta content="text/VBScript" http-equiv="content-script-type" />
<meta content="text/JScript" http-equiv="content-script-type" />
0
 
LVL 7

Author Comment

by:NathanIrwin
ID: 33548649
Hi kapiltapa,

I know according to the tutorial I am trying it is suppose to be in the DOCUMENT properties, but as you can see from the attached image, in my case it is not. Is there something I am missing?


DOCUMENTS-prop.JPG
0
 
LVL 16

Expert Comment

by:Vikram Singh Saini
ID: 33548727
Hi,

I would like to see your web page (Default.aspx). And I would suggest you to check if in other web pages the same problem is persisting. If yes then mistake in VS 2005 and if no then mistake in only that page.  And let me know when did you faced the same problem?

Regards,
VSS
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:kapiltapa
ID: 33548746
public ClientScriptManager ClientScript { get; }
0
 
LVL 7

Author Comment

by:NathanIrwin
ID: 33548758
Hi VSS,
here is the default.aspx...it's nothing impressive, I'm just sarting out in Web Forms and this is the first tutorial I have tried

Nathan
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>My First Page</title>
<script language="javascript" type="text/javascript">
// <!CDATA[

function btnClient_onclick() {

    
}

// ]]>
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        &nbsp; &nbsp;
        <br />
        <br />
        <asp:Button ID="ntnServer" runat="server" Style="z-index: 100; left: 10px; position: absolute;
            top: 53px" Text="Server" />
        &nbsp; &nbsp; &nbsp; &nbsp;
        <asp:Label ID="lblServer" runat="server" Style="z-index: 101; left: 77px; position: absolute;
            top: 55px" Text="Server" Width="96px"></asp:Label>
        <br />
        <br />
        <input id="btnClient" style="z-index: 103; left: 10px; width: 59px; position: absolute;
            top: 91px" type="button" value="Client" onclick="return btnClient_onclick()" />
        &nbsp; &nbsp; &nbsp;
        <asp:Label ID="lblClient" runat="server" Style="z-index: 104; left: 78px; position: absolute;
            top: 92px" Text="Client" Width="93px"></asp:Label>
        <br />
        <br />
    
    </div>
    </form>
</body>
</html>

Open in new window

0
 
LVL 16

Expert Comment

by:Vikram Singh Saini
ID: 33548759
Hi,

While searching for your problem on Google, it returns me only 3 pages. And out of them one was of use to explain the reason behind this behavior.

So before I delve into reasons of not working I would like to share with you that you can make its working possible by the instructions at link: http://msdn.microsoft.com/en-us/library/5y06x9d7%28v=VS.80%29.aspx

Now the reason:
I tested to find that same property DefaultClientScript in VS 2005, VS 2008 & VS 2010. And you would surprise to know that the same property is only available in VS  2005 and not in other. So I found a statement online stating that the same property was available in beta version of Asp.Net 2.0 (http://www.codeproject.com/Messages/2113636/Re-where-do-I-find-DefaultClientScript-property.aspx). So that could be the reason in your system. Might be you are not having that version in your system.

Regards,
VSS
0
 
LVL 7

Author Comment

by:NathanIrwin
ID: 33548769
VSS,

When I open a new Web Site project and go to the Properties for the DOCUMENT, the  defaultclientscript property is not i the properties list

Nathan
0
 
LVL 7

Author Comment

by:NathanIrwin
ID: 33548780
The MS .Net framework I have is version 2.0.50727 SP2
Maybe that is the problem
0
 
LVL 16

Expert Comment

by:Vikram Singh Saini
ID: 33548795
Hi,

I do think so because I am having  version 2.0.50727 SP1 and so I am able to see the same property in VS 2005.

However go to Tools --> Import and Export Settings --> And select last radiobutton to Reset All Settings.

But this can also make your customized settings to reset.

Regards,
VSS
0
 
LVL 7

Author Comment

by:NathanIrwin
ID: 33548841
VSS,

I have reset the Web Development back to the default setting, but this still has not made the property available.

I don't think I have the VS 2005 SP1 installed on my machine, I am downloading this from MS now. Maybe after I run this SP it will reslove the issue.

Nathan
0
 
LVL 16

Expert Comment

by:Vikram Singh Saini
ID: 33548847
Hi,

I too hope that would solve your problem.

Regards,
VSS
0
 
LVL 16

Expert Comment

by:Vikram Singh Saini
ID: 33548852
Hi,

By the way which VS 2005 Edition you are working on?

Regards,
VSS
0
 
LVL 7

Author Comment

by:NathanIrwin
ID: 33548882
Thanks for your help, I will let you know how I go, it will take a few hours for this Sp to download.

So if I am understand you correctly before, this property is available in VS 2008 and VS 2010 ? or are you to use the source view on the default.aspx page to set this property?

Regards,
Nathan
0
 
LVL 16

Expert Comment

by:Vikram Singh Saini
ID: 33548890
Hi,

You mistaken me. See my comment above, it is, I tested to find that same property DefaultClientScript in VS 2005, VS  2008 & VS 2010. And you would surprise to know that the same  property is only available in VS  2005 and not in other.

To view the same property from VS 2005 you would need to have Design View open of Default.aspx.

Regards,
VSS
0
 
LVL 16

Accepted Solution

by:
Vikram Singh Saini earned 500 total points
ID: 33555893
0
 
LVL 7

Author Closing Comment

by:NathanIrwin
ID: 33555908
Thanks VSS,

As I mentioned in my other question, this has resolved both my problems.

Thanks for all your time.

Nathan
0
 
LVL 16

Expert Comment

by:Vikram Singh Saini
ID: 33555918
Hello Nathan,

I really feel pleasure in solving your problem. Though it take 5 to 6 hours for searching and reading documents online and then writing article which you read at link. But atlast I was having solution for my problem too.

Happy Coding.

Regards,
VSS
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question