Where can I find defaultclientscript property in Visual Studio 2005

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??

LVL 7
NathanIrwinMining AnalystAsked:
Who is Participating?
 
Vikram Singh SainiConnect With a Mentor Software Engineer cum AD DeveloperCommented:
0
 
kapiltapaCommented:
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
 
NathanIrwinMining AnalystAuthor Commented:
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
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
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
 
kapiltapaCommented:
public ClientScriptManager ClientScript { get; }
0
 
NathanIrwinMining AnalystAuthor Commented:
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
 
Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
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
 
NathanIrwinMining AnalystAuthor Commented:
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
 
NathanIrwinMining AnalystAuthor Commented:
The MS .Net framework I have is version 2.0.50727 SP2
Maybe that is the problem
0
 
Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
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
 
NathanIrwinMining AnalystAuthor Commented:
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
 
Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
Hi,

I too hope that would solve your problem.

Regards,
VSS
0
 
Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
Hi,

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

Regards,
VSS
0
 
NathanIrwinMining AnalystAuthor Commented:
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
 
Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
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
 
NathanIrwinMining AnalystAuthor Commented:
Thanks VSS,

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

Thanks for all your time.

Nathan
0
 
Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.