.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Client script not running

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

Dear all,

in my MVC 2 application, and in the shared Master Page I wrote this little script for menu handling :

<script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script type="text/javascript"> $(document).ready(function () {   
     $('#nav li').hover(  
         function () {  
             //show its submenu  
             $('ul', this).slideDown(100);  
        function () {  
           //hide its submenu  
            $('ul', this).slideUp(100);           

The script, that shows menu items when the

View Complete Post

More Related Resource Links

Running Client Script to Read TextBox Value from AJAX PopupControl Extender


I used PopupControl Extender to display row details from a gridview, and need to update the two textboxes, but the changed value in the textboxes did not get picked up when click the update button on the popup window, so I need to get client side javascript to read the new changed value from these text boxes. However, I tried a few way, none worked for me, not sure what is wrong.

1. Add a javascript function in the .aspx file and use onclientclick of the linkbutton control to call the function, I got error of "Microsoft JScript runtime error: Object required".


<script language="javascript" type="text/javascript">
     function newTextValue(textbox) 
      var text = document.getElementById("TextBox1").Value;

<asp:TextBox ID="TextBox1" runat="server"  Text='<%# Bind("GalleryTemplateName") %>' Height="20px" Width="230px"
                    style="text-align: left"></asp:Text

Incorrect syntax near 'GO' error while running a sql script ?


I am using Visual Studio 2008

I have one Database A

now i want to create Database B just like Database A

I generated a script of Database A

and created fresh Database B

Now, when i try to run the generated script against Database B, i get this error, why ? how to fix it ?

sql error

For your information:

I have checked in my script it is:


and i have also tried to save the sql script in notepad as: ANSI, UTF-8 and UNICODE

and then i copied from txt file to query but still doesn't work and getting the same error

and these are the option that i selected/used while creating my script:


How to keep my Workflow alive only during the time my client application is running ?

Hi, I want to my workflow do some action when server  lose connection with client and at the same time client get exceptions about it. It is possible to implement some session mechanism or something like that with workflow service ? Regards Marcin

net.tcp://localhost:80/MyService client/server errors while IIS is running - even though all Net.TCP

Hello, I am trying to create a simple WCF client/server solution in two Windows Forms projects, respectively.  I am using net.tcp binding on port 80 and have enabled the port sharing property.  My NET.TCP Port Sharing service is running.  I am using Windows 7 x64 and logged in as an administrator.  I've added my username to the smvchost configuration files, in both Framework and Framework 64 directories. I also have IIS running on port 80. However, there seems to be a conflict between net.tcp on port 80 and IIS on port 80 simultaneously.  My understanding was that the Net.TCP Port Sharing is supposed to be the solution for this very scenario. Here are the specific issues: 1.  I start the server in debug mode, which works fine.  I then try to connect with the client, and get the error: "You have tried to create a channel to a service that does not support .Net Framing.  It is possible that you are encountering an HTTP endpoint".  This seems to imply that the NET.TCP Port Sharing is not forwarding the request to my WCF server, and instead is encountering IIS.  This is the first problem. 2.  The second issue is that the Server starts fine in Visual Studio in debug mode, however when I try to run it as a compiled EXE (and right-click - run as admin) it errors "The TransportMana

Can I invoke a client side script from server side code

Hi is it possible to involk a client side script from the server side code without any interaction from the client side?Such as a popup or alert box?I know I can code this with the page load or the click event, I would like to call the alert from within my serverside code and trigger the action from there.Thanks

stop running this script error in htmleditor

Hello, I am using AjaxToolkit 3.5 for HTMLEditor contorl. In one of the form i have pasted around 50 pages of word document. While i tried to save the input to the database, i get javascript popup error message saying "Stop running the script". Any help would be appreciated.  

Error when running an SQL script to restore a database on SQL Server 2008 R2 Express

Hi, At work, I use SQL Server 2008 Express running on Windows XP Professional Service Pack 3. At home, I also use SQL Server 2008 Express running on Windows XP Professional Service Pack 3. Whenever I do work on the database at work, I usually restore the database at home (or vice versa) I have been using the following SQL scripts to back up the database and to restore the same database (at work or at home). BackupRealEstate.sql USE Master BACKUP DATABASE [RealEstate] TO DISK = N'F:\My Documents\My Database\RealEstate.bak' WITH NOFORMAT, INIT, NAME = N'RealEstate-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO RestoreRealEstate.sql USE Master RESTORE DATABASE [RealEstate] FROM DISK = N'F:\My Documents\My Database\RealEstate.bak' WITH  FILE = 1, NOUNLOAD, REPLACE, STATS = 10 GO Everything worked fine until I replaced my 8yo home computer with a newer and faster one. My new home computer is running Windows 7 Home Premium and I use the latest SQL Server 2008 R2 Express. When I tried to run the above restore SQL script, I got the following error message: Msg 3101, Level 16, State 1, Line 2 Exclusive access could not be obtained because the database is in use. Msg 3013, Level 16, State 1, Line 2 RESTORE DATABASE is terminating abnormally. There was no other application/process using this database. Can someone please help me? Regards,

Problem registering client side script to interact with AJAX controls

Im using some animationExtenders in my project. The thing is, the objects to be animated are created programmatically, hence i need to also build programmatically the javascript code that will interact with them.It runs properly but, when i interact with these animated controls and the javascript functions are supposed to get to work, i keep getting the usual run-time error saying that the javascript functions are not defined. But, if i check the final html code generated, i can see how all the controls i built programmatically are there ,as well as the script.Tried both RegisterStartupScript and RegisterClientScriptBlock, no luck.Any advice? thanks in advance

Problem running jquery script in Content Page

Hi!! I have a master page in asp.net and a content page with some basic asp.net controls like textbox,buttons,treeview....i have a jquery script in the content page and reference set to the jquery file..The script changes the text property of a button on the keydown event set for the textbox...the script works fine if i copy and paste it in a normal page...the script only ran once when i worte it for the first time the next day when i tried to run the script it was not working..i m facing this problem for running the script in content page and i a m not aware of how to write jquery script for the content page.. i m really not finding any solution where i am wrong i have even tried setting the internet explorer security setting to low..plz plz plz plz plz plz help me on Thanks!!

Running DB script with App install


I've got a Windows Service app I wrote that requires three new tables and several views and SPs to be created.  I've got a complete script that works and have added a custom action in the form of a VBS file that references the script file. 

My vbs file looks like this

Set WSHShell = CreateObject("Wscript.Shell")
WSHShell.Run ("sqlcmd -S OFFICE8995 -U sa -P mypassword -d DBName -i C:\Program Files\ITService\TestScript.txt")

I can run the TestScript in Query Analyzer and it works but the VBS file is not working.  The database is a MSDE 2000 db and was hoping to use sqlcmd which I do have on this box. But the osq isnt working either.

How can I debug this?  Anything obvious that I'm missing?



Client Script Replace Problem with .NET 4.0 ScriptManager



I want to replace the WebUIValidation.js client script (located in System.Web assembly) with my own custom script using the new script replacement features in .NET 4.0.

The replacement works fine in a simple sample form I created, but in my much more complicated wizard form it fails.  On partial post-back the ScriptManager writes the System.Web version to the browser and I end up with both Microsoft's version and my version of the script in the browser. Since the System.Web version loads last, it replaces my custom script.

I am using the ToolkitScriptManager intead of the ScriptManager everywhere. The form that needs the replacement has dynamically created controls (including the validation controls) and has several control extenders based on the AjaxControlToolkit.

Does anyone have any ideas on what could be going wrong, or have any ideas on a workaround for this?

Any help will be appreaciated,


Client side script for server side controls


I have a whole table full of checkboxes each of which is associated with a label.  Both checkboxes and labels have runat="server".  What I'd like to do is to write a small script that will make visible or hide the label depending on the check state of the checkbox.

function ShowHideLabel(cbControl, lControl)
    lControl.Visible = cbControl.Checked;


<asp:checkbox id="cb1" runat="server" text="CheckBox 1" OnClick="?" />
<asp:label id="l1" runat="server" text="I am visible" />

What do I need to put in OnClick for this to work?



Should Lotus Notes Client be running or Open in background to send emails programatically using .NET



Does Lotus notes client be running or opened in the background to send emails using Lotus Notes with .Net?

    I am working on a task where my app should send emails using Lotus Notes with .NET . I am able to send mails also. But the problem comes when i close my Lotus Notes mail and try to run my application which sends mails. But the mails are not being delivered. Reason, they were being stored in "Outgoing mail". Again when i open my Lotus Notes client by entering my username and password, then the mails that were in "Outgoing mail" were been delivered. Should lotus notes client run on the background for my application to send emails? Is there any way that my application sends emails even if lotus notes is not opened? I'm struck with this issue all day, did lot of research, but i could find anything.

i used this link  as a base ref to send emails using .net http://www.ibm.com/developerworks/lotus/library/domino-msnet/  

Any help regarding this is greatly appreciated.

Running an XMLA script of a database on another database



I used the "Script Database as -> Create to" option on an Analysis Services DB and now I'm trying to run the script on another DB server, but I get an error message that it already exists, and indeed it does, but then when I delete it and run the script again, I get a message that it doesn't exist(!) or the user doesn't have access to it (but it's actually defined as having server-wide permissions). Does anyone have an idea what the problem might be? What am I missing here?


How I disable query results window while running a script


I am running a sql script which Inserts 500 rows and after each insert, it calls a stored procedure which diplays result in the results window. So after executing 100 rows, it throws an error that maximum number od results in the results pane has reached its limit but the query executes successfully. How can we disable the stored proc output to not display in the results pane. I do not have access to the stored procedure.

invalid character whil running the open xml script

hi i am facing problem while running the following sql statement

 SET NOCOUNT ON DECLARE @hDoc INT EXEC sp_xml_preparedocument @hDoc OUTPUT, '<NewDataSet> <Forms Layout=''&lt;StackPanel Background=&quot;#FFFFFFFF&quot; Name=&quot;StackPanelUser&quot; Width=&quot;1001&quot; Height=&quot;600&quot; Margin=&quot;10,5,10,5&quot; HorizontalAlignment=&quot;Center&quot; ClipToBounds=&quot;True&quot; twcdd:RadDragAndDropManager.AllowDrop=&quot;True&quot; xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot; xmlns:iedf=&quot;clr-namespace:Iris.Ews.Designer.Form;assembly=Iris.Ews.Designer.Form&quot; xmlns:twcdd=&quot;clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls&quot;&gt;&#xD;&#xA; &lt;ScrollViewer HorizontalScrollBarVisibility=&quot;Auto&quot; VerticalScrollBarVisibilit

Call to WCF service and threads running at client & service end


I'm sending custom header from Silverlight application to the WCF service over HTTPS.  Through the custom header, I'm sending client's CultureInfo to the WCF service and expecting the response from service in the language of the culture I have sent. I have applied custom behaviors to both client and service ends correctly by implementing IEndpointBehavior, IClientMessageInspector and IDispatchMessageInspector.

I'm assuming that the the thread on which the call to service is made would be the same running at service end. i.e. the thread running the AfterReceiveRequest would be the same as the thread running the actual server code. Is it correct? If I set the CultureInfo of the thread to what I want, will I get the response from the service using the same culture?

(I have hosted wcf service on my local IIS. For testing purpose, I set CultureInfo on the thread to Swedish culture but the response is always in American English (which is my computer's culture language.)

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend