<
asp:Button ID="btnDelete" runat ="server" Text ="Delete" cssclass="RadUploadSubmit" OnClientClick="return OpenConfirm();"
Visible="False" />
function OpenConfirm() {
radconfirm(
'<h3 style=\'color: #333399;\'>Are you sure?</h3>', confirmCallBackFn, 330, 100, null, 'RadConfirm custom title');
return false;
function confirmCallBackFn(arg) {
radalert(
"<strnog>radconfirm</strong> returned the following result: <h3 style='color: #ff0000;'>" + arg + "</h3>", null, null, "Result");
}
Please tell me where do I modify javascript so it fires server side click after User selects Ok on confirmation dialog.
Thank you.
| <EditFormSettings EditFormType="Template"> |
| <FormTemplate> |
| <table id="tblAddEdit" cellspacing="1" cellpadding="1" width="100%" border="0" runat="server" > |
| <tr> |
| <td > |
| </td> |
| <td> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| Course:</td> |
| <td> |
| <asp:DropDownList ID="cboCourse" runat="server" Width="200px" |
| TabIndex="1" AppendDataBoundItems="true"> |
| </asp:DropDownList> |
| <asp:RequiredFieldValidator ID="Requiredfieldvalidator00" Runat="server" Display="Dynamic" ControlToValidate="cboCourse" ErrorMessage="Select Course" /> |
| <asp:label ID="lblCourseID" runat="server" Visible="false" Text='<%# eval("CourseID") %>'></asp:label> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2" style="height:6px" > |
| </td> |
| </tr> |
| <tr> |
| <td> |
| Level:</td> |
| <td> |
| <asp:DropDownList ID="cboLevel" runat="server" Width="200px" |
| TabIndex="1" AppendDataBoundItems="true"> |
| </asp:DropDownList> |
| <asp:RequiredFieldValidator ID="Requiredfieldvalidator0" Runat="server" Display="Dynamic" ControlToValidate="cboLevel" ErrorMessage="Select Level" /> |
| <asp:label ID="lblLevelId" runat="server" Visible="false" Text='<%# eval("SubjectCode") %>'></asp:label> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2" style="height:6px" > |
| </td> |
| </tr> |
| <tr> |
| <td> |
| Teacher:</td> |
| <td> |
| <asp:DropDownList ID="cboTeacher" runat="server" Width="200px" |
| TabIndex="2" AppendDataBoundItems="true"> |
| </asp:DropDownList> |
| <asp:RequiredFieldValidator ID="Requiredfieldvalidator1" Runat="server" Display="Dynamic" ControlToValidate="cboTeacher" ErrorMessage="Select Teacher" /> |
| <asp:label ID="lblTeacherID" runat="server" Visible="false" Text='<%# eval("TeacherID") %>'></asp:label> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2" style="height:6px" > |
| </td> |
| </tr> |
| .... |
| .... |
| .... |
| </FormTemplate> |
| For example, |
| public void InstantiateIn(System.Web.UI.Control container) |
| { |
| RadTreeView RadTreeView1 = new RadTreeView(); |
| RadTreeView1.ID = "myTree" & myNumber |
| RadTreeView1.DataTextField = "Text"; |
| RadTreeView1.DataNavigateUrlField = "Url"; |
| RadTreeView1.DataFieldID = "ID"; |
| RadTreeView1.DataFieldParentID = "ParentID"; |
| RadTreeView1.DataSource = siteData; |
| RadTreeView1.DataBind(); |
| } |
After successfully installing RadControls_for_ASP.NET_AJAX_2009_2_826_trial.msi in Windows Vista Ultimate SP2 I took the exact same msi and tried to install it on Windows Server 2003 R2 SP2, but this time, after seeming to start fine, it puts up the following error pop-up:
The cabinet file 'media1.cab' required for this
installation is corrupt and cannot be used. This
could indicate a network error, an error reading
from the CD-ROM, or a problem with this
package.
Retry Cancel
No amount of Retry attempts helps.
Please don't tell me to download a fresh copy. This is the exact same MSI file that had zero problems installing on Vista SP2, so I am 100% confident that the msi is not corrupt.
Anyone know what the problem is??
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register src="UserControls/FieldEntry.ascx" tagname="FieldEntry" tagprefix="uc1" %>
<!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 id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="ScriptManager1" runat="server" EnableTheming="True">
</telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
</telerik:RadAjaxManager>
<asp:Repeater ID="Repeater1" DataSourceID="ldsFields" runat="server">
<ItemTemplate>
<uc1:FieldEntry ID="Value1"
FieldName='<%# Eval("FieldName") %>'
FieldLabel='<%# Eval("FieldLabel") %>'
Hint='<%# Eval("Hint") %>'
InputControlWidth='<%# Eval("InputControlWidth") %>'
InputMaxLength='<%# Eval("InputMaxLength") %>'
ValidationType='<%# Eval("ValidationType") %>'
TapeValue='<%# Eval("TapeValue") %>'
ShowTapeValue ='<%# Eval("ShowTapeValue") %>'
PrimarySource='<%# Eval("PrimarySource") %>'
ShowPrimarySource='<%# Eval("ShowPrimarySource") %>'
SecondarySource='<%# Eval("SecondarySource") %>'
ShowSecondarySource='<%# Eval("ShowSecondarySource") %>'
runat="server" />
<asp:RequiredFieldValidator ID="rfvValue"
ControlToValidate="Value1"
ValidationGroup="Page"
runat="server"
ErrorMessage="All Fields are required.">
</asp:RequiredFieldValidator>
</ItemTemplate>
</asp:Repeater>
<asp:Button ID="Button1" runat="server" ValidationGroup="Page" Text="Submit" />
<asp:LinqDataSource ID="ldsFields" runat="server" ContextTypeName="LoanDataContext" TableName="FieldEntryTesting" OrderBy="PrimarySortOrder, FieldLabel">
</asp:LinqDataSource>
<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" />
</form>
</body>
</html>
UserControl:
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="FieldEntry.ascx.vb" Inherits="UserControls_FieldEntry" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<table style="table-layout: fixed; border: none; padding: 0px; margin: 0px">
<colgroup>
<col width="150px" />
<col width="0%" />
<col width="0%" />
<col width="0%" />
</colgroup>
<tr>
<th style="border: none; padding: 0px; margin: 0px; text-align: left;">
<asp:Label ID="lName" runat="server"></asp:Label>
<telerik:RadToolTip ID="rtpSource" TargetControlID="lName" runat="server">
</telerik:RadToolTip>
</th>
<td style="border: none; padding: 0px; margin: 0px">
<telerik:RadTextBox ID="rtbItem"
AutoPostBack="true"
CausesValidation="false"
EmptyMessage=""
runat="server">
<EmptyMessageStyle BorderColor="Red"></EmptyMessageStyle>
</telerik:RadTextBox>
</td>
<td>
<div id="divTapeValue" runat="server"></div>
</td>
<td style="border: none; padding: 0px; margin: 0px">
<div id="divReason" runat="server" visible="false">
<telerik:RadTextBox ID="rtbReason"
EmptyMessage="(reason)"
Width="100%"
MaxLength="250"
runat="server">
<EmptyMessageStyle BorderColor="Red" />
</telerik:RadTextBox>
<telerik:RadToolTip ID="rtpReason"
TargetControlID="rtbReason"
runat="server">
</telerik:RadToolTip>
<asp:RequiredFieldValidator ID="rfvReason"
ErrorMessage="Reason is required"
ControlToValidate="rtbReason"
Text="*"
Display="none"
runat="server">
</asp:RequiredFieldValidator>
</div>
</td>
</tr>
</table>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>
USER CONTROL CODE:
Imports Telerik.Web.UI
Imports System.Linq
Imports System.Data.Linq
Imports System.ComponentModel
<DefaultProperty("Text"), ControlValueProperty("Text"), ValidationProperty("Text")> Partial Class UserControls_FieldEntry
Inherits System.Web.UI.UserControl
Public Property [Text]() As String
Get
Return rtbItem.Text
End Get
Set(ByVal value As String)
rtbItem.Text = value
End Set
End Property
Public Property UsesTapeValue() As Boolean
Get
If IsNothing(ViewState("UsesTapeValue")) Then
ViewState("UsesTapeValue") = False
End If
Return ViewState("UsesTapeValue")
End Get
Set(ByVal value As Boolean)
ViewState("UsesTapeValue") = value
End Set
End Property
Public Property FieldName() As String
Get
Return ViewState("FieldName")
End Get
Set(ByVal value As String)
ViewState("FieldName") = value
End Set
End Property
Public Property FieldLabel() As String
Get
Return Me.lName.Text
End Get
Set(ByVal value As String)
Me.lName.Text = value
End Set
End Property
Public Property Hint() As String
Get
Return Me.rtbItem.EmptyMessage
End Get
Set(ByVal value As String)
Me.rtbItem.EmptyMessage = value
End Set
End Property
Public Property PrimarySource() As String
Get
Return If(ViewState("PrimarySource") Is Nothing, "", ViewState("PrimarySource"))
End Get
Set(ByVal value As String)
ViewState("PrimarySource") = value
End Set
End Property
Public Property SecondarySource() As String
Get
Return If(ViewState("Secondary") Is Nothing, "", ViewState("Secondary"))
End Get
Set(ByVal value As String)
ViewState("PrimarySource") = value
End Set
End Property
Public Property TapeValue() As String
Get
Return If(ViewState("TapeValue") Is Nothing, "", ViewState("TapeValue"))
End Get
Set(ByVal value As String)
ViewState("TapeValue") = value
rtpReason.Text = String.Format("Tape Value: {0}", value)
End Set
End Property
Public WriteOnly Property ShowTapeValue() As Boolean
Set(ByVal value As Boolean)
If value Then
divTapeValue.InnerHtml = String.Format("Tape Value: {0}", TapeValue)
Else
divTapeValue.InnerHtml = String.Empty
End If
End Set
End Property
Public Property ShowPrimarySource() As Boolean
Get
Return ViewState("ShowPrimarySource")
End Get
Set(ByVal value As Boolean)
ViewState("ShowPrimarySource") = value
End Set
End Property
Public Property ShowSecondarySource() As Boolean
Get
Return ViewState("ShowSecondarySource")
End Get
Set(ByVal value As Boolean)
ViewState("ShowSecondarySource") = value
End Set
End Property
Public Property ValidationType() As String
Get
Return ViewState("ValidationType")
End Get
Set(ByVal value As String)
ViewState("ValidationType") = value.ToLower
SetValidationPattern(value.ToLower)
End Set
End Property
Public Property InputControlWidth() As Int16
Get
Return ViewState("InputControlWidth")
End Get
Set(ByVal value As Int16)
ViewState("InputControlWidth") = value
rtbItem.Width = Unit.Pixel(value)
End Set
End Property
Public Property InputMaxLength() As Int16
Get
Return rtbItem.MaxLength
End Get
Set(ByVal value As Int16)
rtbItem.MaxLength = value
End Set
End Property
Private Const NAV As String = "((na|NA|Na|nA)([vV]?))" ' NA and NAV
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack Then
Else
Dim ram As RadAjaxManager = RadAjaxManager.GetCurrent(Page)
ram.AjaxSettings.AddAjaxSetting(rtbItem, divReason)
ram.AjaxSettings.AddAjaxSetting(rtbItem, rtbReason)
End If
'Dim vg As String = Me.NamingContainer.ID & "_vg"
'rtbItem.ValidationGroup = vg
'rtbReason.ValidationGroup = vg
'rfvReason.ValidationGroup = vg
End Sub
Protected Sub rtbItem_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rtbItem.TextChanged
If TapeValue = rtbItem.Text Then
'divReason.Style("display") = "none"
divReason.Visible = False
rtbItem.BorderColor = Drawing.Color.Green
UsesTapeValue = True
Else
UsesTapeValue = False
rtbItem.BorderColor = Drawing.Color.Blue
rtbReason.Focus()
'divReason.Style("display") = "inline"
divReason.Visible = True
End If
End Sub
Private Sub SetSourceTooltip()
Dim s As New StringBuilder
If ShowPrimarySource AndAlso PrimarySource.Trim.Length > 0 Then
s.AppendFormat("<div>{0}", PrimarySource)
If ShowSecondarySource AndAlso SecondarySource.Trim.Length > 0 Then
s.AppendFormat("<br />{0}</div>", SecondarySource)
End If
ElseIf ShowSecondarySource AndAlso SecondarySource.Trim.Length > 0 Then
s.AppendFormat("<div>{0}</div>", SecondarySource)
End If
If s.Length > 0 Then
rtpSource.Enabled = True
lName.ToolTip = s.ToString
Else
rtpSource.Visible = False
End If
End Sub
Private Sub SetValidationPattern(ByVal value As String)
Select Case value
Case "date"
Case "length"
End Select
End Sub
Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
If Page.IsPostBack Then
Else
'SetSourceTooltip()
End If
End Sub
End Class
Imports Telerik.Web.UI
Imports System.Linq
Imports System.Data.Linq
Imports System.ComponentModel
<DefaultProperty("Text"), ControlValueProperty("Text"), ValidationProperty("Text")> Partial Class UserControls_FieldEntry
Inherits System.Web.UI.UserControl
Public Property [Text]() As String
Get
Return rtbItem.Text
End Get
Set(ByVal value As String)
rtbItem.Text = value
End Set
End Property
Public Property UsesTapeValue() As Boolean
Get
If IsNothing(ViewState("UsesTapeValue")) Then
ViewState("UsesTapeValue") = False
End If
Return ViewState("UsesTapeValue")
End Get
Set(ByVal value As Boolean)
ViewState("UsesTapeValue") = value
End Set
End Property
Public Property FieldName() As String
Get
Return ViewState("FieldName")
End Get
Set(ByVal value As String)
ViewState("FieldName") = value
End Set
End Property
Public Property FieldLabel() As String
Get
Return Me.lName.Text
End Get
Set(ByVal value As String)
Me.lName.Text = value
End Set
End Property
Public Property Hint() As String
Get
Return Me.rtbItem.EmptyMessage
End Get
Set(ByVal value As String)
Me.rtbItem.EmptyMessage = value
End Set
End Property
Public Property PrimarySource() As String
Get
Return If(ViewState("PrimarySource") Is Nothing, "", ViewState("PrimarySource"))
End Get
Set(ByVal value As String)
ViewState("PrimarySource") = value
End Set
End Property
Public Property SecondarySource() As String
Get
Return If(ViewState("Secondary") Is Nothing, "", ViewState("Secondary"))
End Get
Set(ByVal value As String)
ViewState("PrimarySource") = value
End Set
End Property
Public Property TapeValue() As String
Get
Return If(ViewState("TapeValue") Is Nothing, "", ViewState("TapeValue"))
End Get
Set(ByVal value As String)
ViewState("TapeValue") = value
rtpReason.Text = String.Format("Tape Value: {0}", value)
End Set
End Property
Public WriteOnly Property ShowTapeValue() As Boolean
Set(ByVal value As Boolean)
If value Then
divTapeValue.InnerHtml = String.Format("Tape Value: {0}", TapeValue)
Else
divTapeValue.InnerHtml = String.Empty
End If
End Set
End Property
Public Property ShowPrimarySource() As Boolean
Get
Return ViewState("ShowPrimarySource")
End Get
Set(ByVal value As Boolean)
ViewState("ShowPrimarySource") = value
End Set
End Property
Public Property ShowSecondarySource() As Boolean
Get
Return ViewState("ShowSecondarySource")
End Get
Set(ByVal value As Boolean)
ViewState("ShowSecondarySource") = value
End Set
End Property
Public Property ValidationType() As String
Get
Return ViewState("ValidationType")
End Get
Set(ByVal value As String)
ViewState("ValidationType") = value.ToLower
SetValidationPattern(value.ToLower)
End Set
End Property
Public Property InputControlWidth() As Int16
Get
Return ViewState("InputControlWidth")
End Get
Set(ByVal value As Int16)
ViewState("InputControlWidth") = value
rtbItem.Width = Unit.Pixel(value)
End Set
End Property
Public Property InputMaxLength() As Int16
Get
Return rtbItem.MaxLength
End Get
Set(ByVal value As Int16)
rtbItem.MaxLength = value
End Set
End Property
Private Const NAV As String = "((na|NA|Na|nA)([vV]?))" ' NA and NAV
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack Then
Else
Dim ram As RadAjaxManager = RadAjaxManager.GetCurrent(Page)
ram.AjaxSettings.AddAjaxSetting(rtbItem, divReason)
ram.AjaxSettings.AddAjaxSetting(rtbItem, rtbReason)
End If
'Dim vg As String = Me.NamingContainer.ID & "_vg"
'rtbItem.ValidationGroup = vg
'rtbReason.ValidationGroup = vg
'rfvReason.ValidationGroup = vg
End Sub
Protected Sub rtbItem_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rtbItem.TextChanged
If TapeValue = rtbItem.Text Then
'divReason.Style("display") = "none"
divReason.Visible = False
rtbItem.BorderColor = Drawing.Color.Green
UsesTapeValue = True
Else
UsesTapeValue = False
rtbItem.BorderColor = Drawing.Color.Blue
rtbReason.Focus()
'divReason.Style("display") = "inline"
divReason.Visible = True
End If
End Sub
Private Sub SetSourceTooltip()
Dim s As New StringBuilder
If ShowPrimarySource AndAlso PrimarySource.Trim.Length > 0 Then
s.AppendFormat("<div>{0}", PrimarySource)
If ShowSecondarySource AndAlso SecondarySource.Trim.Length > 0 Then
s.AppendFormat("<br />{0}</div>", SecondarySource)
End If
ElseIf ShowSecondarySource AndAlso SecondarySource.Trim.Length > 0 Then
s.AppendFormat("<div>{0}</div>", SecondarySource)
End If
If s.Length > 0 Then
rtpSource.Enabled = True
lName.ToolTip = s.ToString
Else
rtpSource.Visible = False
End If
End Sub
Private Sub SetValidationPattern(ByVal value As String)
Select Case value
Case "date"
Case "length"
End Select
End Sub
Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
If Page.IsPostBack Then
Else
'SetSourceTooltip()
End If
End Sub
End Class