Solved

Where can I find defaultclientscript property in Visual Studio 2005

Posted on 2010-08-28
17
270 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 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

25 Experts available now in Live!

Get 1:1 Help Now