master
editor 1 day ago
commit dda91011fa

@ -0,0 +1,63 @@
OBOUTSUITE EXAMPLES(C#/VB)演示源码
一、源码描述
环境VS2022 Access
二、功能介绍
obout Suite for .NET是一个非常实用的常用用户界面控件套装它包含了obout公司所有23个应用于.NET 2.0,.NET 1.x及ASP,HTML的空间产品
其功能包括树形列表,表格,文件传输与上传,菜单,滚动条,日历,HTML文本编辑,组合框,按钮等等。其全面性和高效性,使它成为您必备的开发工具。
产品模块:
AJAXPage Examples
ASPTreeView Examples
ASP.NET Grid Examples
Calendar Examples
ColorPicker Examples
Combobox Examples
Easy Menu Examples
Editor Examples
FileUploadProgress Examples
Flyout Examples
Scheduler Examples
Slide Menu Examples
Show Examples
Splitter Examples
SuperButton Examples
TreeDB Examples
TextMenu Examples
Window Examples
Demo文件包括C#和Vb.net两个版本
运行文件夹下的RunExamples.exe既可运行演示程序
打开Default.aspx
三、注意事项
ctrl+F5运行即可。
作者: obout
如需获得该源码的视频、更新等更多资料请访问: https://www.51aspx.com/Code/OboutSuite
------------------------------------------------------------------------------------------------
源码服务专家
官网: https://www.51aspx.com
讨论圈: https://club.51aspx.com/
平台声明:
1.51Aspx平台上提供下载的资源为免费、共享、商业三类源码,其中免费和共享源码仅供个人学习和研究使用,商业源码请在相应的授权许可条件下使用;
2.51Aspx平台对提供下载的软件及其它资源不拥有任何权利,其版权归属源码合法拥有者所有;
3.著作权人发现本网站载有侵害其合法权益的内容或作品,请与我们联系( 登录官网与客服反馈或发送邮件到support@51Aspx.com
4.51Aspx平台不保证提供的下载资源的准确性、安全性和完整性;
友情提示:
一般数据库文件默认在 DB_51Aspx 文件夹下
默认账号密码一般均为51Aspx
关于源码使用常见问题及解决方案,请参阅: https://www.51aspx.com/Help

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- _LocalBinding -->
<!-- _lcid="1033" _version="11.0.5510"-->
<!-- _SIG="92LpZarNFpy8HPfXqs37FVYBlesUbCaEwW2c3wOeiSauCGyIeDDcvk12mNZ9UohBVZSwSrMJoGcwU5LBxi/hZdRcUwGDc6AmjuCRpvEf9JNlhH0tj6N1AXdFkXrlPaEtcoO2VQlmADKAuAJL9HsefGlO+pBlUpjwQMMsMWkghJU=" -->
<SKUID>
<!-- Mapping Records -->
<!--
No 0
Yes 1
Enterprise 0
Retail 1
OEM 2

@ -0,0 +1,15 @@
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<%@ Register Assembly="obout_AJAXPage" Namespace="OboutInc" TagPrefix="oajax" %>
<!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>Untitled Page</title>
<script language="javascript" type="text/javascript">
function DoCallback()
{
ob_post.post(null, "DoCallback", function(){alert('callback ended...')});
}
</script>
</head>

@ -0,0 +1,15 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class MasterPage : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{

@ -0,0 +1,15 @@
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage"%>
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Import Namespace="obout_ASPTreeView_2_NET" %>
<%@ Import Namespace="System.Data.OleDb" %>
<%@ Import Namespace="System.Data" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e) {
if (!IsCallback)
{
obout_ASPTreeView_2_NET.Tree oTree = new obout_ASPTreeView_2_NET.Tree();
OleDbConnection oConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("../App_Data/AddressBook.mdb"));
oConn.Open();
oTree.AddRootNode("Address Book", "folder.gif");

@ -0,0 +1,15 @@
<%@ Page Language="C#" Debug="True" Inherits="OboutInc.oboutAJAXPage" %>
<%@ Import Namespace="System.Diagnostics" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
void Page_Load(object o, EventArgs e) {
CreateTimer ("updateCount", "computeCount", "getResult", 1000);
}
public float computeCount() {
Random rnd = new Random();
float val = rnd.Next(4);
if(val == 2) // insert a random spike
return rnd.Next(40);
return rnd.Next(10);

@ -0,0 +1,15 @@
<%@ Page Language="C#" Debug="True" Inherits="OboutInc.oboutAJAXPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
void Page_Load(object o, EventArgs e) {
CreateTimer ("updateCount", "computeCount", "getResult", 1000);
}
public float computeCount() {
Random rnd = new Random();
float val = rnd.Next(4);
if(val == 2) // insert a random spike
return rnd.Next(40);
return rnd.Next(10);

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Import Namespace="System.Data.OleDb" %>
<%@ Register TagPrefix="obout" Namespace="OboutInc.Combobox" Assembly="obout_Combobox_Net" %>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<script language="C#" runat="server">
static readonly object obj = new object();
void Page_Load(object sender, EventArgs e) {
if (!IsPostBack)
{
// load continent list from the database
OleDbConnection myConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("../App_Data/DynamicCombobox.mdb"));
myConn.Open();

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="ogrid" Namespace="Obout.Grid" Assembly="obout_Grid_NET" %>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e) {
if (Session["lUpdate"] == null)
Session["lUpdate"] = DateTime.Now;
LoadLUpdate();
LoadItems();
}

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Text.RegularExpressions" %>
<script language="C#" runat="server">
public Hashtable unique(string elementValue, string elementID)
{
bool valid = true;
ArrayList listNames = new ArrayList();
listNames.Add("john");
listNames.Add("david");
listNames.Add("tim");
listNames.Add("sheldon");

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage" %>
<%@ Register TagPrefix="obout" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<%@ Import Namespace="System.Data.OleDb" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.Common" %>
<script language="c#" runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!IsCallback && !IsPostBack)
{
LoadBasket();
LoadCategory(1);
}
if (!IsCallback)

@ -0,0 +1,15 @@
<%@ Import Namespace="Obout.Tree_DB"%>
<%@ Page Language="C#" AutoEventWireup="true" Inherits="OboutInc.oboutAJAXPage" %>
<script runat="server">
public TreeDB oTreeDB;
protected void Page_Load(object sender, EventArgs e)
{
oTreeDB = new TreeDB();
// declaring the connection string:
// Sql Express
oTreeDB.ConnectionString = "Server=.\\SQLEXPRESS;AttachDBFilename=|DataDirectory|TreeNodes.mdf;Database=TreeNodes;Trusted_Connection=Yes;";
//MSSQL Server
//oTreeDB.ConnectionString = "Driver={SQL Server};Server=localhost;UID=obout_usr;PWD=obout_pwd;Database=obout;";

@ -0,0 +1,15 @@
<%@ Page Language="C#" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register Src="aspnet_Tree_UserControl.ascx" TagName="TreeUserControl" TagPrefix="uc1" %>
<html>
<head runat="server">
<title>obout.com - Tutorial for Dnd using ASPTreeView, AJAXPage and TreeDB inside User Control</title>
<style type="text/css">
P {font:11px verdana; color:#666666;}
a {font:11px verdana; color:#0033cc;}
</style>
</head>
<body>
<br />
<p>
<b>Use the 3 components together (ASPTreeView, AJAXPage and Tree_DB) inside User Control</b>
</p>

@ -0,0 +1,15 @@
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Control Language="C#" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
obout_ASPTreeView_2_NET.Tree oTree = new obout_ASPTreeView_2_NET.Tree();
//sql express
SqlConnection oConn = new SqlConnection("Server=.\\SQLEXPRESS;AttachDBFilename=|DataDirectory|TreeNodes.mdf;Database=TreeNodes;Trusted_Connection=Yes;");
//MSSQL Server
//SqlConnection oConn = new SqlConnection("Driver={SQL Server};Server=localhost;UID=obout_usr;PWD=obout_pwd;Database=obout;");
//MySql
//SqlConnection oConn = new SqlConnection("DRIVER={MySQL ODBC 3.51 Driver};Server=localhost;UID=root;PWD=root_pwd;Database=test");

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script language="C#" runat="server">
public string onVote(int qNr, int aNr, int nrOfAnswers)
{
string result = qNr.ToString();
int [] q = new int [nrOfAnswers + 1];
// connect to the database
OleDbConnection myConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("../App_Data/vote.mdb") + ";User Id=Admin;Password=;");
OleDbCommand myComm;
myConn.Open();
// add 1 vote to the answer chosen
myComm = new OleDbCommand("UPDATE VoteOption set Result=Result+1 where QID=" + qNr + " and AID=" + aNr, myConn);
myComm.ExecuteNonQuery();

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="obout" Namespace="OboutInc.Calendar2" Assembly="obout_Calendar2_Net" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e)
{
if (!IsCallback)
{
myCalendar.DateToday = new DateTime(1983, 5, 22);
myCalendar.ShowYearSelector = true;
myCalendar.TitleText = "";
}
}
public string ComputeAge(string name, int year)
{

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<script runat="server" language="c#">
public string onAddParam(string Param1, string Param2, string Param3, string Param4, string Param5, string Param6, string Param7, string Param8, string Param9, string Param10)
{
int j = 0;
string result;
if (Param1==null)
{
return ("No parameter has been added after the last callback.");
}
else
{
j++;
result = "This data is returned from the server.\n\nThe parameter list is:\nParam1: " + Param1 + "\n";
if (Param2!=null){

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<script runat="server" language="c#">
public string onDnD2(int number1, int number2)
{
DateTime dt = DateTime.Now;
while (DateTime.Now.Subtract(dt).Seconds < 3) { }
return (number1 + number2).ToString();
}
</script>
<html>
<head runat="server">
<script language="JavaScript">
function ASyncCallback() {
ob_post.AddParam('number1', 49583);
ob_post.AddParam('number2', 83924);

@ -0,0 +1,15 @@
<%@ Register TagPrefix="obout" Namespace="OboutInc.Combobox" Assembly="obout_Combobox_Net" %>
<%@ Control Language="C#" %>
<script type="text/javascript">
// this function opens the combobox each time a user types something
function openCombobox() {
cbo1.open();
}
// this function initiates an ajax callback to load the description for a given word
function getWordDescription() {
var sWord = cbo1.getText();
ob_post.AddParam("sWord", sWord);
ob_post.post(null, "GetWordDescription", loadWordDescription);
}

@ -0,0 +1,15 @@
<%@ Register Src="aspnet_autosuggest.ascx" TagName="AutoSuggestControl" TagPrefix="uc1" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.Data.OleDb" %>
<%@ Page language="c#" Inherits="OboutInc.oboutAJAXPage" %>
<script language="C#" runat="server">
// This method loads the words from the database and creates and XML string
// The XML string will be used to add the options to the combobox
public string OnSuggestOptions(string sText)
{
string sResponse = "";
// Setting the connection
OleDbConnection oConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("../App_Data/A_Words.mdb"));
oConn.Open();

@ -0,0 +1,15 @@
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage"%>
<%@ Page Language="C#" Inherits="aspnet_baseclass" Src="aspnet_baseclass.aspx.cs" %>
<html>
<head runat="server">
<style>
.title {font-size: X-Large; padding: 20px; border-bottom: 2px solid gray; width: 100%; }
</style>
<script language="javascript">
function PanelUpdate()
{
ob_post.post(null, "PanelUpdate", function(){});
}

@ -0,0 +1,15 @@
using System.Web.UI.WebControls;
public class aspnet_baseclass : aspnet_basebaseclass
{
protected Literal literal;
public void PanelUpdate()
{
literal.Text = "test";
UpdatePanel("callbackPanel1");
}
}
public class aspnet_basebaseclass : OboutInc.oboutAJAXPage

@ -0,0 +1,13 @@
<%@ Page language="c#" Inherits="OboutInc.oboutAJAXPage" %>
<%@ Register TagPrefix="obout" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<obout:CallbackPanel runat="server" ID="postbackPanel1">
<content style="border: 1px solid gray; background-color: #EFEFEF;">
<table width=100% height=100% cellpadding=0 cellspacing=0>
<tr>
<td align=center valign="middle" class="tdText">
simple text here
</td>
</tr>
</table>
</content>
</obout:CallbackPanel>

@ -0,0 +1,15 @@
<%@ Page language="c#" Inherits="OboutInc.oboutAJAXPage" %>
<%@ Register TagPrefix="obout" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<obout:CallbackPanel runat="server" ID="postbackPanel2">
<content style="border: 1px solid gray; background-color: #EFEFEF;">
<table width=100% height=100% cellpadding=0 cellspacing=0>
<tr>
<td align=center valign="middle" class="tdText">
<style media="all">.something
{
COLOR: blue;
}
</style>
<script language="javascript">alert("this alert is from a script inside the panel");</script>
<div class="something">text with css and js</div>

@ -0,0 +1,15 @@
<%@ Page language="c#" Inherits="OboutInc.oboutAJAXPage" %>
<%@ Register TagPrefix="obout" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<%@ Register TagPrefix="osm" Namespace="OboutInc.SlideMenu" Assembly="obout_SlideMenu3_Pro_Net" %>
<html>
<head>
</head>
<body>
<obout:CallbackPanel runat="server" ID="postbackPanel5">
<content style="border: 1px solid gray; background-color: #EFEFEF;">
<table width=100% height=100% cellpadding=0 cellspacing=0>
<tr>
<td align=center valign="middle" class="tdText">
<osm:SlideMenu
id = "pro7"
runat = "server"

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage" EnableCallbackViewstate="true" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e) {
// set the initial ViewState variable value. this is only executed on first load of page
// when there is a postback or callback, IsPostBack is true
if (!Page.IsPostBack)
ViewState["something"] = 1;
// if it's not a callback (aka first load or postback) write the value of the viewstate variable
if (!IsCallback)
if (ViewState["something"] != null)
lblViewState.Text = "ViewState value = " + ViewState["something"].ToString();
}
public string tempFunction() {

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e) {
RequestTimeoutMilliseconds = 4000;
}
public void MyServerMethod(bool withTimeout) {
if (withTimeout)
System.Threading.Thread.Sleep(5000);
}
</script>
<html>
<head runat="server">

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e) {
callbackPanel1.BeforePanelUpdate += new OnBeforePanelUpdate(oboutAJAXPage_BeforePanelUpdate);
}
private bool oboutAJAXPage_BeforePanelUpdate(string PanelId, string UpdateContainer) {
System.Threading.Thread.Sleep(2000);
return true;
}
public void MyServerMethod() {
}

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<script language="C#" runat="server">
public void ServerCreateTimer () {
CreateTimer("MyTimer", "fillDiv('myDIV')", 3000);
}
public void ServerCancelTimer () {
CancelTimer("MyTimer");
}
</script>
<html>
<head runat="server">
<script language="JavaScript">
function fill(){

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<script language="C#" runat="server">
public void ServerCreateTimer () {
if (Session["nrCallback"] != null)
Session["nrCallback"] = 0;
CreateTimer("MyTimer", "myServerMethod", "myClientFunction", 2000);
}
public void ServerCancelTimer () {
if (Session["nrCallback"] != null)
Session["nrCallback"] = 0;
CancelTimer("MyTimer");

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="ogrid" Namespace="Obout.Grid" Assembly="obout_Grid_NET" %>
<%@ Register TagPrefix="obout" Namespace="OboutInc.Combobox" Assembly="obout_Combobox_Net" %>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<%@ Register TagPrefix="spl2" Namespace="OboutInc.Splitter2" Assembly="obout_Splitter2_Net" %>
<%@ Import Namespace="obout_ASPTreeView_2_NET" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e) {
if (!IsPostBack)
LoadCustomers();
if (!IsPostBack || (Session["CustomerLoaded"] != null && (bool)Session["CustomerLoaded"]))
{
Session["CustomerLoaded"] = false;

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e) {
cp1.BeforePanelUpdate += new OnBeforePanelUpdate(oboutAJAXPage_BeforePanelUpdate);
cp2.BeforePanelUpdate += new OnBeforePanelUpdate(oboutAJAXPage_BeforePanelUpdate);
}
private bool oboutAJAXPage_BeforePanelUpdate(string PanelId, string UpdateContainer) {
System.Threading.Thread.Sleep(2000);
return true;
}
</script>

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e) {
cp3.BeforePanelUpdate += new OnBeforePanelUpdate(oboutAJAXPage_BeforePanelUpdate);
cp4.BeforePanelUpdate += new OnBeforePanelUpdate(oboutAJAXPage_BeforePanelUpdate);
}
private bool oboutAJAXPage_BeforePanelUpdate(string PanelId, string UpdateContainer) {
System.Threading.Thread.Sleep(2000);
return true;
}
</script>

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<%@ Register TagPrefix="obout" Namespace="OboutInc.Combobox" Assembly="obout_Combobox_Net" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script language="C#" runat="server">
static readonly object obj = new object();
void Page_Load(object sender, EventArgs e) {
if (!IsPostBack)
{
// load continent list from the database
OleDbConnection myConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("../App_Data/DynamicCombobox.mdb"));
myConn.Open();
OleDbCommand myComm;

@ -0,0 +1,15 @@
<%@Page Language="C#" Inherits="OboutInc.oboutAJAXPage" %>
<script runat="server">
public string DoCallback()
{
return "callback result";
}
</script>
<html>
<head runat="server">
<script>
function DoCallback()
{
ob_post.post(null, "DoCallback", function(result){alert('callback done -> ' + result)})
}
function DoExternalCallback()

@ -0,0 +1,10 @@
<%@Page Language="C#" Inherits="OboutInc.oboutAJAXPage" %>
<script runat="server">
public string DoExternalCallback()
{
return "external callback result";
}
</script>
<html>
</html>

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Import Namespace="obout_ASPTreeView_2_NET" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<%@ Register TagPrefix="ogrid" Namespace="Obout.Grid" Assembly="obout_Grid_NET" %>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<%@ Register TagPrefix="obspl" Namespace="OboutInc.Splitter2" Assembly="obout_Splitter2_Net" %>
<script language="C#" runat="server">
string initialDirectory = "resources/FileBrowser";
string DefaultFolder;

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Import Namespace="OboutInc" %>
<%@ Register TagPrefix="obout" Namespace="OboutInc.Calendar2" Assembly="obout_Calendar2_Net" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e)
{
if (!IsCallback)
{
myCalendar.DateToday = new DateTime(1983, 5, 22);
myCalendar.ShowYearSelector = true;
myCalendar.TitleText = "";
}
}
[JSVisible]

@ -0,0 +1,15 @@
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage"%>
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="obout" Namespace="OboutInc.Combobox" Assembly="obout_Combobox_Net" %>
<%@ Register TagPrefix="obcal" Namespace="OboutInc.Calendar2" Assembly="obout_Calendar2_Net" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e) {
if (!IsPostBack)
{
PopulateWithData();
myCalendar1.SelectedDate = DateTime.Now.AddDays(7);
myCalendar1.DateMin = DateTime.Now.AddDays(7);

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="obout" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e)
{
/* this event is used for a better view of the client side panel update */
callbackPanelLogin.BeforePanelUpdate += new OnBeforePanelUpdate(oboutAJAXPage_BeforePanelUpdate);
callbackPanelSearchInDatabase.BeforePanelUpdate += new OnBeforePanelUpdate(oboutAJAXPage_BeforePanelUpdate);
callbackPanelProcessing.BeforePanelUpdate += new OnBeforePanelUpdate(oboutAJAXPage_BeforePanelUpdate);
if (IsCallback && IsSearchInDatabase)
{
/* search the database */
}

@ -0,0 +1,15 @@
<%@ Master Language="C#" %>
<%@ Register Assembly="obout_AJAXPage" Namespace="OboutInc" TagPrefix="oajax" %>
<script language="C#" runat="server">
public void DoCallback()
{
lblText.Text = "some text from server ... panel update ...";
((OboutInc.oboutAJAXPage)this.Page).UpdatePanel("CallbackPanel1");
}
</script>
<!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>Untitled Page</title>
<script language="javascript" type="text/javascript">

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" Inherits="OboutInc.oboutAJAXPage" %>
<%@ Register TagPrefix="obout" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<obout:CallbackPanel runat="server" ID="callbackPanel_ASPTreeView">
<content>
<table width=100% height=100% cellpadding=0 cellspacing=0>
<tr>
<td align=center valign="middle" class="tdText">

@ -0,0 +1,5 @@
<%@ Page Language="C#" MasterPageFile="MasterPage.master" AutoEventWireup="true" Inherits="OboutInc.oboutAJAXPage" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div id="container" style="border: gray 1px solid;height:500px;text-align:center;width:700px;"></div>
</asp:Content>

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" Inherits="OboutInc.oboutAJAXPage" %>
<%@ Register TagPrefix="obout" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<obout:CallbackPanel runat="server" ID="callbackPanel_Grid">
<content>
<table width=100% height=100% cellpadding=0 cellspacing=0>
<tr>
<td align=center valign="middle" class="tdText">

@ -0,0 +1,15 @@
<%@ Master Language="C#" AutoEventWireup="true" %>
<%@ Register TagPrefix="oem" Namespace="OboutInc.EasyMenu_Pro" Assembly="obout_EasyMenu_Pro" %>
<!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>Untitled Page</title>
<script language="javascript" type="text/javascript">
function Navigate(callbackPanelName, containerName, pageName)
{
ob_post.UpdatePanelFromPage(callbackPanelName, containerName, pageName);
}
</script>
</head>
<body>

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e) {
if (!IsPostBack) {
UpdateWeather();
CreateTimer("weatherupdate", "UpdateWeather", "function(){}", 2000);
}
}
public void UpdateWeather()
{
Random r1 = new Random();
lImage.Text = "images/Weather/" + r1.Next(1, 34).ToString() + ".gif"; // 1 - 34
Random r2 = new Random();

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<script language="C#" runat="server">
public void ServerOpenWindow() {
// this will open a new window at client
OpenWindow("aspnet_SomePage.aspx", "_blank", "width=400, height=250");
}
</script>
<html>
<head runat="server">
<script>
function OpenWindow() {
ob_post.post(null, 'ServerOpenWindow', function(){});
}

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<script language="C#" runat="server">
public void ServerRedirect()
{
Redirect("http://www.obout.com");
}
</script>
<html>
<head runat="server">
<script>
function DoCallback()

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e)
{
label1.Text = DateTime.Now.ToString();
label2.Text = DateTime.Now.ToString();
label3.Text = DateTime.Now.ToString();
label4.Text = DateTime.Now.ToString();
panelAlways.BeforePanelUpdate += new OnBeforePanelUpdate(oboutAJAXPage_BeforePanelUpdate);
panelOnCallback.BeforePanelUpdate += new OnBeforePanelUpdate(oboutAJAXPage_BeforePanelUpdate);
panelOnExplicitRequest.BeforePanelUpdate += new OnBeforePanelUpdate(oboutAJAXPage_BeforePanelUpdate);
panelOnExplicitRequestAndPageLoad.BeforePanelUpdate += new OnBeforePanelUpdate(oboutAJAXPage_BeforePanelUpdate);
}

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e) {
if (!IsCallback)
{
obout_ASPTreeView_2_NET.Tree oTree = new obout_ASPTreeView_2_NET.Tree();
OleDbConnection oConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + System.Web.HttpContext.Current.Server.MapPath("../App_Data/Products.mdb"));
oConn.Open();
// read the information from the database
string sQuery = "SELECT NodeID, ParentID, NodeHTML, NodeIcon, NodeLevel, Expanded FROM Category ORDER BY NodeLevel ASC";
OleDbCommand oCommand = new OleDbCommand(sQuery);

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<script language="C#" runat="server">
public void SendCollection(string myCollectionParam) {
string[] myCollection = myCollectionParam.Split(new char[]{'|'});
string myCollectionString = string.Empty;
for (int i=0;i<myCollection.Length;i++)
{
myCollectionString += myCollectionString == string.Empty ? myCollection[i] : ", " + myCollection[i];
}
ShowAlert("The collection items are: " + myCollectionString);
}

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<script language="C#" runat="server">
public void ServerSetValueText() {
// this will set the value of element with id "textElement" to a custom value
// just to show that it works with input elements (textboxes)
SetValue("textElement", "someCustomValue");
}
public void ServerSetValueSelect() {
// this will set the value of element with id "selectElement" to a custom value
// just to show that it works with dropdown elements (comboboxes)
SetValue("selectElement", "3");
}
public void ServerSetValueTextarea() {

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<script language="C#" runat="server">
public void ServerShowAlert() {
// this will show an alert at client side
ShowAlert("This alert was sent by server");
}
</script>
<html>
<head runat="server">
<script language="JavaScript">
function ShowAlert() {
ob_post.post(null, 'ServerShowAlert', function(){});

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<script language="C#" runat="server">
public void ServerUseConfirmDialog () {
// these are the params that can be sent to the result function along with the response
Hashtable ht = new Hashtable();
ht.Add("param1", 1);
ht.Add("param2", "a");
// call the ShowConfirmDialog function with the message, the function to call
// after the user answers, and the extra parameters the function should have.
// the initial client side function that called this function (ServerUseConfirmDialog)
// will receive the final answer of function Confirm
ShowConfirmationDialog("Are you sure?", "Confirm", ht);
}

@ -0,0 +1,15 @@
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage"%>
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage" %>
<script language="C#" runat="server">
public void PanelUpdate()
{
literal.Text = "test";
UpdatePanel("callbackPanel1");
}
</script>
<html>
<head runat="server">
<style>

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage" %>
<script language="c#" runat="server">
public string onDnD2(int number1, int number2)
{
DateTime dt = DateTime.Now;
while (DateTime.Now.Subtract(dt).Seconds < 3) { }
return (number1 + number2).ToString();
}
</script>
<html>
<head runat="server"><style>
.title {font-size: X-Large; padding: 20px; border-bottom: 2px solid gray; width: 100%; }
</style></head>
<body>
<table border="0">

@ -0,0 +1,15 @@
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<%@ Register TagPrefix="oem" Namespace="OboutInc.EasyMenu_Pro" Assembly="obout_EasyMenu_Pro" %>
<%@ Page Language="C#" Inherits="OboutInc.oboutAJAXPage" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
lSrc.Text = "item1";
EasymenuTabStrip.SelectedItemId = "item1";
}
}
private bool cp1_OnBeforePanelUpdate(string PanelId, string UpdateContainer)
{

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e) {
serverTime.Text = DateTime.Now.TimeOfDay.ToString();
serverMillisecond.Text = DateTime.Now.Millisecond.ToString().PadLeft(3, '0');
}
</script>
<html>
<head runat="server"><style>
.title {
font-size: X-Large;
padding: 20px;
border-bottom: 2px solid gray;

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<%@ Import Namespace="System.Data" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e) {
LoadContactList();
}
public void LoadContactList() {
if (Session["contacts"] == null) {
DataSet dsContacts = new DataSet();
dsContacts.Tables.Add(new DataTable());
dsContacts.Tables[0].Columns.Add(new DataColumn("name", System.Type.GetType("System.String")));
dsContacts.Tables[0].Columns.Add(new DataColumn("phone", System.Type.GetType("System.String")));
dsContacts.Tables[0].Columns.Add(new DataColumn("email", System.Type.GetType("System.String")));

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<%@ Import Namespace="System.Data" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e) {
serverTime.Text = DateTime.Now.ToString();
serverTime3.Text = DateTime.Now.ToString();
postbackPanel1.BeforePanelUpdate += new OnBeforePanelUpdate(oboutAJAXPage_BeforePanelUpdate);
postbackPanel3.BeforePanelUpdate += new OnBeforePanelUpdate(oboutAJAXPage_BeforePanelUpdate);
}
private bool oboutAJAXPage_BeforePanelUpdate(string PanelId, string UpdateContainer) {
System.Threading.Thread.Sleep(2000);
return true;

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<html>
<head runat="server">
<style>
.title {
font-size: X-Large;
padding: 20px;
border-bottom: 2px solid gray;
width: 100%;
}
</style>
</head>
<body>
<table border="0">

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<html>
<head runat="server"><style>
.title {
font-size: X-Large;
padding: 20px;
border-bottom: 2px solid gray;
width: 100%;
}
</style></head>
<body>
<table border="0">
<tr>
<td valign="top" width="630" colspan="4">
<span class="title">Callback Panel - UpdatePanelFromPage</span><br /><br /><br />

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<html>
<head runat="server"><style>
.title {
font-size: X-Large;
padding: 20px;
border-bottom: 2px solid gray;
width: 100%;
}
</style></head>
<body>
<table border="0">
<tr>

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<html>
<head runat="server">
<style>
.title {
font-size: X-Large;
padding: 20px;
border-bottom: 2px solid gray;
width: 100%;
}
</style>
</head>
<body>
<table border="0">

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<%@ Import Namespace="obout_ASPTreeView_2_NET" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e) {
obout_ASPTreeView_2_NET.Tree oTree = new obout_ASPTreeView_2_NET.Tree();
oTree.Add("root", "a0", "obout.com (a0)", true, "Folder.gif", null);
oTree.Add("a0", "a1", "ASP TreeView (a1)", true, "tree.gif", null);
oTree.Add("a1", "a2", "Fast (a2)", true, null, null);
oTree.Add("a1", "a3", "Easy (a3)", true, "page.gif", null);
oTree.Add("root", "a4", "Links & Notes since 1998 (a4)", true, "BookY.gif", null);
oTree.Add("root", "a5", "MemoBook.com (a5)", true, "ball_glass_blueS.gif", null);
oTree.FolderIcons = "../ASPTreeView/tree2/Icons";

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="OboutInc.oboutAJAXPage"%>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e) {
cp_weather.BeforePanelUpdate += new OnBeforePanelUpdate(oboutAJAXPage_BeforePanelUpdate);
if (IsCallback || !IsPostBack)
{
Random r1 = new Random();
lImage.Text = "images/Weather/" + r1.Next(1, 34).ToString() + ".gif"; // 1 - 34
Random r2 = new Random();
lDegree1.Text = r2.Next(30, 70).ToString();
lDegree2.Text = lDegree1.Text;
lDate.Text = DateTime.Now.ToString();

@ -0,0 +1,9 @@
<%@ Page Language="C#" MasterPageFile="aspnet_masterpage.master" AutoEventWireup="true" Inherits="OboutInc.oboutAJAXPage" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
page content here ...
<br /><br /><br />
<a style="font-family:Tahoma;font-size:12px" href="Default.aspx?type=ASPNET"><3E> Back to examples</a>
</asp:Content>

@ -0,0 +1,15 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class aspnet_withmasterpages : OboutInc.oboutAJAXPage
{
protected void Page_Load(object sender, EventArgs e)
{

@ -0,0 +1,15 @@
<%@ Control Language="C#" %>
<%@ Register Assembly="obout_AJAXPage" Namespace="OboutInc" TagPrefix="oajax" %>
<script runat="server">
public string DoCallbackFromUC()
{
return "string from User Control method.";
}
</script>
<script language="javascript" type="text/javascript">
function DoCallback()
{
ob_post.post(null, "DoCallback", function(){alert('callback ended...')});
}
function DoCallbackFromUC()

@ -0,0 +1,15 @@
<%@ Page Language="C#" Inherits="OboutInc.oboutAJAXPage" %>
<%@ Register Src="aspnet_withusercontrol.ascx" TagName="WebUserControl" TagPrefix="uc1" %>
<script runat="server">
public void DoCallback()
{
((Literal)WebUserControl1.FindControl("lblText")).Text = "some text from server ... panel update ...";
UpdatePanel("CallbackPanel1");
}
public string DoCallbackFromUC()
{
return WebUserControl1.DoCallbackFromUC();
}
</script>
<html>

@ -0,0 +1,15 @@
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage"%>
<%@ Page Language="C#" Inherits="cs_AddressBook" Src="cs_AddressBook.aspx.cs"%>
<html>
<head runat="server">
<style>
td {font: 10pt Tahoma; margin: 20px;}
.title {font-size: X-Large; padding: 20px; border-bottom: 2px solid gray; width: 100%; }
</style>
<script type="text/javascript">
function displayContactInfo()
{
ob_post.UpdatePanel("cpContactInfomation");
}

@ -0,0 +1,15 @@
using System;
using System.Data;
using System.Data.OleDb;
using System.Web.UI.WebControls;
using obout_ASPTreeView_2_NET;
public class cs_AddressBook : OboutInc.oboutAJAXPage
{
protected Literal TreeView;
protected Literal lContactImage;
protected Literal lContactName;
protected Literal lContactCompany;
protected Literal lContactEmail;
protected Literal lContactPhone;
protected Literal lContactCell;

@ -0,0 +1,15 @@
<%@ Page Language="C#" Debug="True" Inherits="cs_CPUMonitorStyle1" Src="cs_CPUMonitorStyle1.aspx.cs" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head runat="server">
<style type="text/css">
.gridBg {
background-image:url('images/bg_blue.gif');
width:520px;
height:229px;
overflow:hidden;
}
.graph {
position:relative;
left:37px;
top:14px;

@ -0,0 +1,15 @@
using System;
using System.Diagnostics;
public class cs_CPUMonitorStyle1 : OboutInc.oboutAJAXPage
{
void Page_Load(object o, EventArgs e)
{
CreateTimer ("updateCount", "computeCount", "getResult", 1000);
}
public float computeCount() {
Random rnd = new Random();
float val = rnd.Next(4);
if(val == 2) // insert a random spike

@ -0,0 +1,15 @@
<%@ Page Language="C#" Debug="True" Inherits="cs_CPUMonitorStyle2" Src="cs_CPUMonitorStyle2.aspx.cs" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head runat="server">
<style type="text/css">
.gridBg {
background-image:url('images/bg_gray.gif');
width:520px;
height:229px;
overflow:hidden;
}
.graph {
position:relative;
left:37px;
top:15px;

@ -0,0 +1,15 @@
using System;
public class cs_CPUMonitorStyle2 : OboutInc.oboutAJAXPage
{
void Page_Load(object o, EventArgs e)
{
CreateTimer ("updateCount", "computeCount", "getResult", 1000);
}
public float computeCount() {
Random rnd = new Random();
float val = rnd.Next(4);
if(val == 2) // insert a random spike
return rnd.Next(40);
return rnd.Next(10);

@ -0,0 +1,15 @@
<%@ Page Language="C#" Inherits="cs_DynamicCombobox" Src="cs_DynamicCombobox.aspx.cs"%>
<%@ Register TagPrefix="obout" Namespace="OboutInc.Combobox" Assembly="obout_Combobox_Net" %>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<html>
<head runat="server">
<script>
// update the country list with the countries from the selected continent
function SelectContinent()
{
var ContinentID = cboContinent.getValue();
ob_post.AddParam("ContinentID", ContinentID);
ob_post.UpdatePanel("callbackPanelCountry");

@ -0,0 +1,15 @@
using System;
using System.Data.OleDb;
using OboutInc.Combobox;
public class cs_DynamicCombobox : OboutInc.oboutAJAXPage
{
protected Combobox cboContinent;
protected Combobox cboCountry;
static readonly object obj = new object();
void Page_Load(object sender, EventArgs e) {
if (!IsPostBack)
{

@ -0,0 +1,15 @@
<%@ Page Language="c#" Inherits="cs_Products" Src="cs_Products.aspx.cs"%>
<%@ Register TagPrefix="ogrid" Namespace="Obout.Grid" Assembly="obout_Grid_NET" %>
<%@ Register TagPrefix="oajax" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<html>
<head runat="server">
<style>
.ob_gPST /*.ob_gridPageSizeText*/
{
display: none;
}
.ob_gPSS /*.ob_gridPageSizeSelector*/
{
display: none;
cursor: default;

@ -0,0 +1,15 @@
using System;
using System.Data.OleDb;
using System.Web.UI.WebControls;
using Obout.Grid;
public class cs_Products : OboutInc.oboutAJAXPage
{
protected Literal lUpdate;
protected Grid gridItems;
void Page_Load(object sender, EventArgs e) {
if (Session["lUpdate"] == null)
Session["lUpdate"] = DateTime.Now;
LoadLUpdate();

@ -0,0 +1,15 @@
<%@ Page Language="C#" ASPCOMPAT="TRUE" Debug="true" Inherits="cs_ServerValidator" Src="cs_ServerValidator.aspx.cs"%>
<html>
<head runat="server">
<style>
.error {font: 8pt Tahoma; color:red; display:none;}
.note {font: 7pt Tahoma; color:gray;}
td {font: 10pt Tahoma; margin: 20px;}
.title {font-size: X-Large; padding: 20px; border-bottom: 2px solid gray; width: 100%; }
</style>
<script type="text/javascript">
function TriggerServerValidate(element, serverValidateMethod)
{

@ -0,0 +1,15 @@
using System.Collections;
using System.Text.RegularExpressions;
public class cs_ServerValidator : OboutInc.oboutAJAXPage
{
public Hashtable unique(string elementValue, string elementID)
{
bool valid = true;
ArrayList listNames = new ArrayList();
listNames.Add("john");
listNames.Add("david");
listNames.Add("tim");
listNames.Add("sheldon");
listNames.Add("kim");

@ -0,0 +1,15 @@
<%@ Page Language="C#" Inherits="cs_ShoppingCart" Src="cs_ShoppingCart.aspx.cs" %>
<%@ Register TagPrefix="obout" Namespace="OboutInc" Assembly="obout_AJAXPage" %>
<html>
<head runat="server">
<script type="text/javascript">
// load, specified by param, a product category
function ProductsLoad(CategoryID)
{
CategoryID = CategoryID.replace("node1_", "");
CategoryID = CategoryID.replace("node2_", "");
CategoryID = CategoryID.replace("node3_", "");

@ -0,0 +1,15 @@
using System;
using System.Web.UI.WebControls;
using System.Collections;
using System.Data;
using System.Data.Common;
using System.Data.OleDb;
public class cs_ShoppingCart : OboutInc.oboutAJAXPage
{
protected Literal Category;
protected DataList basket;
protected DataList productList;
protected void Page_Load(object sender, EventArgs e)
{

@ -0,0 +1 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="cs_TreeEvents.aspx.cs" Inherits="cs_TreeEvents" %>

@ -0,0 +1,15 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Obout.Tree_DB;
// derive the page class from the OboutInc.oboutAJAXPage class
public partial class cs_TreeEvents : OboutInc.oboutAJAXPage
{
public TreeDB oTreeDB;

@ -0,0 +1,15 @@
<%@ Page Language="C#" CodeFile="cs_Tree_Page.aspx.cs" Inherits="cs_Tree_Page"%>
<%@ Register Src="cs_Tree_UserControl.ascx" TagName="TreeUserControl" TagPrefix="uc1" %>
<html>
<head runat="server">
<title>obout.com - Tutorial for Dnd using ASPTreeView, AJAXPage and TreeDB inside User Control</title>
<style type="text/css">
P {font:11px verdana; color:#666666;}
a {font:11px verdana; color:#0033cc;}
</style>
</head>
<body>
<br />
<p>
<b>Use the 3 components together (ASPTreeView, AJAXPage and Tree_DB) inside User Control</b>
</p>

@ -0,0 +1,15 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class cs_Tree_Page : OboutInc.oboutAJAXPage
{
protected void Page_Load(object sender, EventArgs e)
{

@ -0,0 +1,15 @@
<%@ Control Language="C#" CodeFile="cs_Tree_UserControl.ascx.cs" Inherits="cs_Tree_UserControl"%>
<script type="text/javascript">
// function used for adding a node - it is triggered when the users clicks on the Add button
function addNode()
{
if(typeof tree_selected_id != "undefined" && document.getElementById("sNewNodeId").value && document.getElementById("sNewNodeText").value)
{
// if a node was selected (this will be the parent of the newly created node)
// and if the id and text of the node were entered, then the node will be created
ob_t2_Add(tree_selected_id, document.getElementById("sNewNodeId").value, document.getElementById("sNewNodeText").value, null, "folder.gif", null);
}
else
{
// if no node was selected, an error message will be displayed

@ -0,0 +1,15 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class cs_Tree_UserControl : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{

@ -0,0 +1,15 @@
<%@ Page Language="C#" Inherits="cs_Vote" Src="cs_Vote.aspx.cs" %>
<html>
<head runat="server">
<script language="javascript">
var isFirefox = ( ( navigator.userAgent.indexOf ( "Firefox" ) != -1 ) && ( parseInt ( navigator.userAgent.charAt ( navigator.userAgent.indexOf ( "Firefox" ) + 8 ) ) >= 1 ) ) ? true : false;
function callbackVote(str){
var j = 0;
var temp = document.getElementById("t" + str).firstChild.firstChild;
if (temp == null){
if (isFirefox) {
temp = document.getElementById("t" + str).firstChild.nextSibling.firstChild;
while (temp.nextSibling.nextSibling != null){
j++;

@ -0,0 +1,15 @@
using System;
using System.Data.OleDb;
public class cs_Vote : OboutInc.oboutAJAXPage
{
public string onVote(int qNr, int aNr, int nrOfAnswers)
{
string result = qNr.ToString();
int [] q = new int [nrOfAnswers + 1];
// connect to the database
OleDbConnection myConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("../App_Data/vote.mdb") + ";User Id=Admin;Password=;");
OleDbCommand myComm;
myConn.Open();
// add 1 vote to the answer chosen
myComm = new OleDbCommand("UPDATE VoteOption set Result=Result+1 where QID=" + qNr + " and AID=" + aNr, myConn);

@ -0,0 +1,15 @@
<%@ Page Language="C#" Inherits="cs_addparam1" Src="cs_addparam1.aspx.cs" %>
<%@ Register TagPrefix="obout" Namespace="OboutInc.Calendar2" Assembly="obout_Calendar2_Net" %>
<html>
<head runat="server">
<script language="JavaScript">
function ComputeAge() {
var name = document.getElementById('txtName').value;
var year = document.getElementById('txtDate').value.split('/')[2];
ob_post.AddParam('name', name);
ob_post.AddParam('year', year);
ob_post.post(null, "ComputeAge", ResultComputeAge);
}
function ResultComputeAge(result , ex) {

@ -0,0 +1,15 @@
using System;
using OboutInc.Calendar2;
public class cs_addparam1 : OboutInc.oboutAJAXPage
{
protected Calendar myCalendar;
void Page_Load(object sender, EventArgs e)
{
if (!IsCallback)
{
myCalendar.DateToday = new DateTime(1983, 5, 22);
myCalendar.ShowYearSelector = true;
myCalendar.TitleText = "";
}

@ -0,0 +1,15 @@
<%@ Page Language="C#" Inherits="cs_addparam2" Src="cs_addparam2.aspx.cs" %>
<html>
<head runat="server">
<script language="JavaScript">
var i = 1;
function incr() {
UpdateDiv();
document.getElementById("pvalue").value="";
if (i < 10){
i++;
document.getElementById("parameter").value="Param" + i;
document.getElementById("pvalue").value="Value" + i;
}
else{
ob_post.post(null,"onAddParam", function(result, ex){alert(result); ClearDiv();});

@ -0,0 +1,15 @@
public class cs_addparam2 : OboutInc.oboutAJAXPage
{
public string onAddParam(string Param1, string Param2, string Param3, string Param4, string Param5, string Param6, string Param7, string Param8, string Param9, string Param10)
{
int j = 0;
string result;
if (Param1==null)
{
return ("No parameter has been added after the last callback.");
}
else
{
j++;
result = "This data is returned from the server.\n\nThe parameter list is:\nParam1: " + Param1 + "\n";
if (Param2!=null){

@ -0,0 +1,15 @@
<%@ Page Language="C#" Inherits="cs_async" Src="cs_async.aspx.cs" %>
<html>
<head runat="server">
<script language="JavaScript">
function ASyncCallback() {
ob_post.AddParam('number1', 49583);
ob_post.AddParam('number2', 83924);
ob_post.post(null,'onDnD2',myFunction);
}
function myFunction(result){
alert("The data has been sent to the server using the asynchronous method.\n\nThe result retrieved from the server is: " + result);
}
function fill(){

@ -0,0 +1,11 @@
using System;
public class cs_async : OboutInc.oboutAJAXPage
{
public string onDnD2(int number1, int number2)
{
DateTime dt = DateTime.Now;
while (DateTime.Now.Subtract(dt).Seconds < 3) { }
return (number1 + number2).ToString();
}
}

@ -0,0 +1,15 @@
<%@ Register TagPrefix="obout" Namespace="OboutInc.Combobox" Assembly="obout_Combobox_Net" %>
<%@ Control Language="C#" CodeFile="cs_autosuggest.ascx.cs" Inherits="cs_autosuggest_uc" %>
<script type="text/javascript">
// this function opens the combobox each time a user types something
function openCombobox() {
cbo1.open();
}
// this function initiates an ajax callback to load the description for a given word
function getWordDescription() {
var sWord = cbo1.getText();
ob_post.AddParam("sWord", sWord);
ob_post.post(null, "GetWordDescription", loadWordDescription);
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save