To Use FgPop just download the fg_helpers.dll and reference it in your project, remember the assembly is using the Framework 4.0.
Alternatively you download the source code and recompile it as your needs.

Once the assembly is referenced in your project and assuming that you are in the code behind
of you Default.aspx, example the Click event of a button, you can:

Open another page (asp.net or html) as popup without writing any javascript static code into the caller page or popup page like this:

private fgpop = new fgPop()
...
fgpop.JQDocReady = True
fgpop.PageToLoad = "MyPopUpPage.aspx"
fgpop.PercentWidth = 60
fgpop.PercentHeight = 80
fgpop.Center = True
fgpop.ScrollBar = True
fgpop.Resizable = True
fgpop.RefreshParent = True
fgpop.AddressBar = False
fgpop.AlertScriptError = True
fgpop.AlertPopupName = True
fgpop.AlertReturnValue = True
fgpop.ControlToValorize = "TextBox1"
fgpop.ControlToValorize = "TextBox2"
fgpop.ControlToClick = "imgRefresh"
Dim script As String = fgpop.JsPop()
ScriptManager.RegisterStartupScript(Me, Me.GetType(), fgpop.jsKey, script, False)
- or - 
Instad of using the ScriptManager here, you can pass the page directly, also as return value you get the generated script.
Dim script As String = fgpop.JsPop(Me.Page)
// ~ 'ScriptManager.RegisterStartupScript(Me, Me.GetType(), fgpop.jsKey, script, False)

In both cases the page "MyPopUpPage.aspx" will explode as modal popup with the caratteristics
you set. Also I want valorize two TextBox with the returned values from popup.


Instead in another event (load or click) of the popup page "MyPopUpPage.aspx" you use the second method
called "JsClosePop" to get values and close the popup like this:

private fgpop = new fgPop()
...
fgpop.JQDocReady = True
fgpop.GetValueFromControlName = "ListBox1"
fgpop.AlertReturnValue = True
fgpop.GetValueFromControlType = fgpop.ControlType.ListBox
Dim script As String = fgpop.JsClosePop
ScriptManager.RegisterStartupScript(Me, Me.GetType(), fgpop.jsKey, script, False)
- or -
Dim script As String = fgpop.JsClosePop(Me.Page)
// ~ 'ScriptManager.RegisterStartupScript(Me, Me.GetType(), fgpop.jsKey, script, False)

In this case I said: give me the two values from the ListBox1 (Text and Value) that I will use to valorize

two Textbox that are inthe caller page.

Note: For the documentation you can download the file "fgPopDocumentation.chm"

Remember! you must add the link to the jquery script file in the caller page and the popup page, also use the <base target tag in the caller page. 

<head runat="server">
    <base target="_self" />
    <title>fgPop Demo</title>
    <script src="Script/jquery-1.7.2.min.js" type="text/javascript"></script>    
</head>