Solved

Where can I find defaultclientscript property in Visual Studio 2005

Posted on 2010-08-28
17
269 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
  • 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
 

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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now