From aspx:
<%@ Register TagPrefix="uc1" TagName="ucMenu" Src="../EditControls/ucMenuEditEvent.ascx" %>
<%@ Register TagPrefix="uc1" TagName="ucEditForm" Src="../EditControls/ucEditForm.ascx" %>
<%@ Register TagPrefix="uc1" TagName="ucFooter" Src="../MainControls/ucFooter.ascx" %>
<%@ Register TagPrefix="uc1" TagName="ucHeader" Src="../MainControls/ucHeader.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false" Inherits="RegisterForEvent.EditForm" CodeFile="EditForm.aspx.vb" %>
<HTML>
<HEAD>
<title>Edit Existing Event</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<LINK href="../../Styles.css" type="text/css" rel="stylesheet">
<script language="javascript">
function popListBox(){
var lBox=document.getElementById('ucEditForm:lstDropOption');
var tBox = document.getElementById('ucEditForm:txtDropOption');
var tValue = tBox.value
var iIndex = lBox.options.length;
if (tValue == "") {
alert("You need to enter a value");
}
else
lBox.options[iIndex]=new Option(tValue,iIndex+1);
lBox.options[iIndex].value=tValue
}
function popAllocationListBox(){
var lBox=document.getElementById('ucEditForm:lstAllocation');
var tAllBox = document.getElementById('ucEditForm:txtAllocationItem');
var tAmtBox = document.getElementById('ucEditForm:txtAllocationAmt');
var tAllValue = tAllBox.value
var tAmtValue = tAmtBox.value
var iIndex = lBox.options.length;
if ((tAllValue == "")||(tAmtValue == "")) {
alert("You need to enter an allocation Item and Amount");
return false
}
else
var lstValue = tAllBox.value + " " + "(" + tAmtBox.value + ")"
lBox.options[iIndex]=new Option(lstValue,iIndex+1);
lBox.options[iIndex].value=lstValue
}
function SelectAllItems(sList)
{
var el = document.getElementById(sList)
var intCount=el.options.length;
for(i = 0; i < intCount;i++)
{
el.options(i).selected=true;
}
}
function DeleteListItem()
{
var lBox=document.getElementById('ucEditForm:lstDropOption');
var iSelIndex =lBox.selectedIndex
if(iSelIndex ==-1){
alert("You need to selected an item to delete");
return false
}
else
lBox.remove(iSelIndex);
}
function ValErrorText()
{
var op = document.getElementById("ucEditForm_rbYes")
var tx = document.getElementById("ucEditForm_txtReqError")
if(op.checked==true){
if (tx.value.length < 1)
{
alert("You must add a validation error message.")
return false;
}
else
{
return true;
}
}
}
</script>
</HEAD>
<body>
<form id="Form1" method="post" onsubmit="SelectAllItems('ucEditForm:lstDropOption');"
runat="server">
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="760" border="0">
<TR>
<TD colSpan="2"><uc1:ucheader id="ucHeader" runat="server"></uc1:ucheader></TD>
</TR>
<TR>
<td colSpan="2"><IMG height="5" src="../../images/shim.gif"></td>
</TR>
<TR>
<TD vAlign="top" width="160"><uc1:ucmenu id="ucMenu" runat="server"></uc1:ucmenu></TD>
<td width="500"><uc1:uceditform id="ucEditForm" runat="server"></uc1:uceditform></td>
</TR>
<TR>
<td colSpan="2"><IMG height="200" src="../../images/shim.gif"></td>
</TR>
<TR>
<TD colSpan="2"><uc1:ucfooter id="ucFooter" runat="server"></uc1:ucfooter></TD>
</TR>
</TABLE>
</form>
</body>
</HTML>
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115:





by: mattegolPosted on 2009-05-11 at 06:06:00ID: 24354087
Controls in usercontrol:
Select allOpen in new window