Question: My motto is to call a Java script function at the end of button click code behind. ie, firstly i need to execute the server side function after which my java script function should get invoked.

**My server side method is as follows** 

protected string SaveEmbedURL\_click()

{

```
    if (txtembedurl.Text != null)
    {
        School aschool = new School();
        aschool.SchoolId = CurrentSchool.SchoolId;
        aschool.EmbedUrl = txtembedurl.Text;
        SchoolRespository.updateEmbedUrl(aschool);
        return "true";
    }

```

}

**My Java script function is as follows**

function SaveEmbedUrlClientSide() {

```
admin_CustomizeTheme.SaveEmbedURL_click(true);
$('#lbl_embedcode').removeClass('hide').addClass('show');
$('#embedCode').removeClass('hide').addClass('show');
CopyToClipboard("embedCode");

```

}

How can i achieve this?

Thanks.

Answer: 
Apparently, I had downloaded a 3 yr old version of Lucene that is prominently linked to for some reason from the home page of the project...downloaded the most recent Lucene source code, compiled, used the new DLL, fixed about everything. The documentation kinda sucks, but the price is right and its real fast.

From a [helpful blog](http://jsprunger.com/getting-started-with-lucene-net/)

> 
> First things first, you have to add
>  the Lucene libraries to your project.
>  On the Lucene.NET web site, you’ll see
>  the most recent release builds of
>  Lucene. These are two years old. **Do
>  not grab them, they have some bugs.**
>  There has not been an official release
>  of Lucene for some time, probably due
>  to resource constraints of the
>  maintainers. Use Subversion (or
>  TortoiseSVN) to browse around and grab
>  the most recently updated Lucene.NET
>  code from the Apache SVN Repository.
>  The solution and projects are Visual
>  Studio 2005 and .NET 2.0, but I
>  upgraded the projects to Visual Studio
>  2008 without any issues. I was able
>  to build the solution without any
>  errors. Go to the bin directory, grab
>  the Lucene.Net dll and add it to your
>  project.
> 
> 
>
Since I can't comment on the marked answer above related to a 3 year old version, I would highly recommend installing the Visual Studio extension for NuGet Package Manager when adding Lucene.NET to your projects. It should add the most recent DLL version for you unless you need a specific later version.