.NET Programming
--
Questions
--
Followers
Top Experts
codebehind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace DealerSocket.Web.Common.UserControls
{
public partial class uc_DatePicker2 : System.Web.UI.UserControl
{
public void Page_Load(object sender, EventArgs e)
{
IntntlDatePick.Attributes.Add("readonly", "readonly");
capti.Text = "";
clrparen.Visible = true;
IntntlDatePick.Text = "";
IntntlDatePick.Enabled = true;
}
public uc_DatePicker2() { }
public string CaptionText
{
get
{
if (capti != null)
{
return capti.Text;
}
else
{
return "";
}
}
set
{
if (capti != null)
{
capti.Text = value;
}
}
}
public string DateText
{
get
{
if (IntntlDatePick != null)
{
return IntntlDatePick.Text;
}
else
{
return "";
}
}
set
{
if (IntntlDatePick != null)
{
IntntlDatePick.Text = value;
}
}
}
public bool DatePickerTextBoxEnabled
{
get
{
if (IntntlDatePick != null)
{
return IntntlDatePick.Enabled;
}
else
{
return true;
}
}
set
{
if (IntntlDatePick != null)
{
IntntlDatePick.Enabled = value;
}
}
}
public bool ShowClearButton
{
get
{
if (clrparen != null)
{
return clrparen.Visible;
}
else
{
return true;
}
}
set
{
if (clrparen != null)
{
clrparen.Visible = value;
}
}
}
}//end class
}//end namespace
markup
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="uc_DatePicker2.ascx.cs" Inherits="DealerSocket.Web.Common.UserControls.uc_DatePicker2" %>
<script src="javascript/datePicker.js"></script>
<script src="javascript/date.js"></script>
<script src="javascript/moment.js"></script>
<script src="javascript/moment-datepicker.js"></script>
<link href="javascript/datepicker.css" rel="stylesheet" />
<style type="text/css">
.datepicker.dropdown-menu {
min-width: 246px !important;
padding-left: 10px !important;
}
.switch {
background: white none repeat scroll 0 0 !important;
}
.datepicker th.switch {
width: 170px !important;
}
.datepicker-days .table-condensed tr td:hover {
background-color: #DCEDF7 !important;
}
.datepicker table tr td.active, .datepicker table tr td.active:hover {
background-image: -moz-linear-gradient(center top, hsl(200, 80%, 40%), hsl(193, 80%, 40%));
background-image: -ms-linear-gradient(top, hsl(200, 80%, 40%), hsl(193, 80%, 40%));
background-image: -webkit-linear-gradient(top, hsl(200, 80%, 40%), hsl(193, 80%, 40%));
}
</style>
<asp:Literal ID="capti" runat="server" Text="<%= this.CaptionText %>" />
<div class='input-group date' id='divDatePick' style="width: 100%;" runat="server">
<asp:TextBox ID="IntntlDatePick" CssClass="form-control" ClientIDMode="Static" Text="" TextMode="DateTime" autocomplete="off" onclick="javascript:openDP($(this),'Visible');" runat="server" />
<span class="input-group-addon" style="cursor: pointer;" onclick="javascript:openDP($(this),'Visible');">
<span class="fa fa-calendar"></span>
</span>
<span id="clrparen" class="input-group-addon" runat="server" style="cursor: pointer; width: 13px;" onclick="javascript:ClearButtonRefreshState($(this).siblings('input').attr('name'), 'Visible');">
<span style="width: 13px; cursor: pointer;" id="clrbtn" class="fa fa-eraser" onclick="javascript:ClearButtonRefreshState($(this).parentsUntil('div').children('input').attr('name'),'Visible');" runat="server"></span>
</span>
</div>
I add a reference to the compiled DLL in another solution, but I keep getting this error:
Error      984      'DateText' is not a member of 'System.Web.UI.UserControl
The actual namespace is DealerSocket.Web.Common.Us
also:
Error      989      'EndDt' is not declared. It may be inaccessible due to its protection level.      C:\git\net\Source\DealerSo
How can I resolve these errors? Â To my knowledge, nothing is private or protected ... all the properties should be public...is my intent.
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
codebehind:
Imports DealerSocket.Data
Imports DealerSocket.Core
Imports DealerSocket.Core.Web
Imports DealerSocket.Data.Administration
Imports DealerSocket.Web
Imports DealerSocket.Core.Globalization
Imports System.Threading
Imports System.Globalization
Public Class admin_bulk_activity_delete
Inherits DSBasePageLegacy
' Copyright © 2001 Firesocket, LLC All rights reserved.
' Name: admin_bulk_activity_delete
' Purpose:
' Written: RodDavis,BBuntin 9/25/03
' Updated: (B.B.) deleted autopostbacks from dropdowns 03/25/04
' Updated: (M.H.) Added Undelete display and functionality.Same changes made to Bulk Event Delete. 03/22/05
' Updated: (M.H.) Added 2 day limit (limit found in sproc). Added "Updated By" dropdown, stolen from bulk event delete 03/24/05
' Updated: (M.H.) Undelete now searches "updated date" instead of "due date" 03/28/05
' Updated: (K.K.) Added chUpdatedBy is requirement field for Undelete option
' Updated: (K.K.) Changed UpdateBy to TextBox field for Undelete
' Update: Chris Jaquess 12/22/08 Updated the restriction from past 2 days to 90 days per QA Ticket 2079566.
' Update: Chris Jaquess 10/28/09 This page now links back to dlrSocket2/Admin/AdminMenu.aspx
' Update: (T.S.) - 12/29/09 - Moving dlrCorp2 to web.config file
Protected UserSiteId As Integer
Public iEventCategory As Integer = SLS_EVT
Public strRole_Previous As String = "First"
Public iRoleId As Integer
Public strArgs As String = String.Empty
Public strArgsave As String = String.Empty
Public strError As String = String.Empty
Public sBrand As String
Public strUndeleteWarning As String = Resource.Bulk_Activity_Delete_Warning_Delete 'gives warning to user that undelete only works for a limited time. Also that deletes are limited to TOP 1000
Public strDorU As String = Resource.Common_DeleteCap 'text of what the user is doing delete or undelete.
Public strDeleteOrUndelete As String = "delete"
Public strRadioDorU As String = String.Empty 'passes Request(RadioDoru)to subpages. Also serves as a flag for the code
Public strDateSearchFieldText As String = Resource.Bulk_Activity_Delete_Due 'label for dropdown
Protected strFSUpdateBy As String = String.Empty
Dim objLocalizationUtils As New LocalizationUtils
Protected backPage As String
Protected Overrides Sub InitializeCulture()
If Thread.CurrentThread.CurrentUICulture.Name <> "en-AU" And Thread.CurrentThread.CurrentUICulture.Name <> "en-NZ" And _
Thread.CurrentThread.CurrentUICulture.Name <> "es" And Thread.CurrentThread.CurrentUICulture.Name <> "zh" Then
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US")
Thread.CurrentThread.CurrentUICulture = New CultureInfo("en-US")
End If
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
RegisterReskinStyleSheet()
If String.IsNullOrEmpty(Request.QueryString("iSiteId")) AndAlso String.IsNullOrEmpty(Request.QueryString("iSocketId")) Then
UserSiteId = UserDefinition.SelectedSite
Else
If String.IsNullOrEmpty(Request.QueryString("iSiteId")) Then
Integer.TryParse(Request.QueryString("iSocketId"), UserSiteId)
Else
Integer.TryParse(Request.QueryString("iSiteId"), UserSiteId)
End If
' Confirm User has access to the SiteId
CheckSiteAccess(UserSiteId)
End If
If hdRadioDorU.Value <> String.Empty Then 'changing the radio button takes precedence over passing DorU in through a param
strRadioDorU = hdRadioDorU.Value
Else
strRadioDorU = Request.QueryString("RadioDorU")
End If
If strRadioDorU = "" Then
strRadioDorU = "ddlRadioDelete"
End If
hdnCulture.Value = objLocalizationUtils.currentCultureString
strError = ""
sBrand = UserDefinition.vchBranding
If Not Page.IsPostBack Then
Dim iSource As Integer = 0
Dim iTrackCode As Integer = 0
Dim strAssigned As String = "" 'String.Empty
Dim strUpdateBy As String = ""
Dim iAddress As Integer = 0
Dim iRole As Integer = 0
Dim iStatus As Integer = 0
Dim tiActivityDate As Integer = 0
Dim iType As Integer = 0
Dim iProduct As Integer = 0
Dim iRank As Integer = 0
Dim deleteConfirm As String = 0
ddlAssigned.DataSource = setSpecifiedUsers(UserSiteId)
ddlAssigned.DataTextField = "FullName"
ddlAssigned.DataValueField = "UsrName"
ddlActType.DataSource = setActType(UserSiteId)
ddlActType.DataTextField = "vchParameterDesc"
ddlActType.DataValueField = "iParameterId"
ddlActStatus.DataSource = setActStatus(UserSiteId)
ddlActStatus.DataTextField = "vchParameterDesc"
ddlActStatus.DataValueField = "iParameterId"
ddlActRank.DataSource = setActRank(UserSiteId)
ddlActRank.DataTextField = "vchParameterDesc"
ddlActRank.DataValueField = "iParameterId"
'page.databind
ddlUpdateBy.DataSource = setSpecifiedUsers(UserSiteId)
ddlUpdateBy.DataTextField = "FullName"
ddlUpdateBy.DataValueField = "UsrName"
ddlRadioDelete.Checked = "True" 'initialize the radios
ddlRadioUndelete.Checked = "False" 'initialize the radios
strUndeleteWarning = Resource.Bulk_Activity_Delete_Warning_Delete 'contains 48 hr warning or 1000 limit
ddlUpdateBy.Visible = True
txtFsUpdateBy.Visible = False
Dim ops As New Operations
If Not (Request.Params("strAssigned") Is Nothing) Then
strAssigned = Request.Params("strAssigned")
ddlAssigned.SelectedIndex = ops.setVAL_Index(strAssigned, ddlAssigned)
End If
If Not (Request.Params("iType") Is Nothing) Then
iType = Request.Params("iType")
ddlActType.SelectedIndex = ops.setVAL_Index(iType, ddlActType)
End If
If Not (Request.Params("iStatus") Is Nothing) Then
iStatus = Request.Params("iStatus")
ddlActStatus.SelectedIndex = ops.setVAL_Index(iStatus, ddlActStatus)
End If
If Not (Request.Params("iRank") Is Nothing) Then
iRank = Request.Params("iRank")
ddlActRank.SelectedIndex = ops.setVAL_Index(iRank, ddlActRank)
End If
If Not (Request.Params("StartDt") Is Nothing) Then
StartDt.DateText = Request.Params("StartDt")
Else
StartDt.DateText = getDateByCulture(DateTime.Today)
End If
If Not (Request.Params("EndDt") Is Nothing) Then
EndDt.DateText = Request.Params("EndDt")
Else
EndDt.DateText = getDateByCulture(DateTime.Today)
End If
If Not (Request.Params("DescLike") Is Nothing) Then
DescLike.Text = Request.Params("DescLike")
End If
If Not (Request.Params("strUpdateBy") Is Nothing) Then
strUpdateBy = Request.Params("strUpdateBy")
txtFsUpdateBy.Value = strUpdateBy
ddlUpdateBy.SelectedIndex = ops.setVAL_Index(strUpdateBy, ddlUpdateBy)
End If
If Not (Request.Params("deleteConfirm") Is Nothing) Then
If (Request.Params("deleteConfirm") = "yes") Then
strError = "deleted"
End If
End If
If ddlRadioDelete.Checked = False Then
strUpdateBy = txtFsUpdateBy.Value
End If
strArgsave = "&iSiteId=" & UserSiteId & "&strAssigned=" & strAssigned & "&iType=" & iType & "&iStatus=" & iStatus & "&iRank=" & iRank & "&StartDt=" & StartDt.DateText & "&EndDt=" & EndDt.DateText & "&DescLike=" & Server.UrlEncode(DescLike.Text) & "&RadioDorU=" & strRadioDorU
strArgs = "&iSiteId=" & UserSiteId & "&strAssigned=" & strAssigned & "&iType=" & iType & "&iStatus=" & iStatus & "&iRank=" & iRank & "&StartDt=" & StartDt.DateText & "&EndDt=" & EndDt.DateText & "&DescLike=" & Server.UrlEncode(DescLike.Text) & "&RadioDorU=" & strRadioDorU & "&strUpdateBy=" & strUpdateBy
Else 'postback
Dim strAssigned As String = ddlAssigned.SelectedItem.Value
Dim iStatus As Integer = ddlActStatus.SelectedItem.Value
Dim iType As Integer = ddlActType.SelectedItem.Value
Dim iRank As Integer = ddlActRank.SelectedItem.Value
Dim vchEndDate
Dim vchStartDate
If hdnRadioChange.Value = "1" Then
vchStartDate = getDateByCulture(DateTime.Today)
StartDt.DateText = getDateByCulture(DateTime.Today)
vchEndDate = getDateByCulture(DateTime.Today)
EndDt.DateText = getDateByCulture(DateTime.Today)
hdnRadioChange.Value = 0
Else
vchStartDate = StartDt.DateText.Trim
vchStartDate = Convert.ToDateTime(vchStartDate)
vchEndDate = EndDt.DateText.Trim
vchEndDate = Convert.ToDateTime(vchEndDate)
End If
Dim strUpdateBy As String = ddlUpdateBy.SelectedItem.Value
If (Not IsNothing(vchEndDate)) And (Not (IsDate(vchEndDate))) Then
strError = "endDate"
vchEndDate = String.Empty
End If
If (Not IsNothing(vchStartDate)) And (Not IsDate(vchStartDate)) Then
strError = "startDate"
vchStartDate = String.Empty
End If
If ddlRadioDelete.Checked = False Then
strUpdateBy = txtFsUpdateBy.Value
End If
strArgsave = "&iSiteId=" & UserSiteId & "&strAssigned=" & strAssigned & "&iType=" & iType & "&iStatus=" & iStatus & "&iRank=" & iRank & "&StartDt=" & vchStartDate & "&EndDt=" & vchEndDate & "&DescLike=" & Server.UrlEncode(DescLike.Text) & "&RadioDorU=" & strRadioDorU
strArgs = "&iSiteId=" & UserSiteId & "&strAssigned=" & strAssigned & "&iType=" & iType & "&iStatus=" & iStatus & "&iRank=" & iRank & "&StartDt=" & vchStartDate & "&EndDt=" & vchEndDate & "&DescLike=" & Server.UrlEncode(DescLike.Text) & "&RadioDorU=" & strRadioDorU & "&strUpdateBy=" & strUpdateBy
End If
If Not (hdRadioDorU Is Nothing) Then
If (strRadioDorU = "ddlRadioDelete") Then
btnDelete.Text = Resource.Bulk_Activity_Delete_Delete_List
ddlRadioDelete.Checked = "True" 'initialize the radios
ddlRadioUndelete.Checked = "False" 'initialize the radios
strUndeleteWarning = Resource.Bulk_Activity_Delete_Warning_Delete 'contains 2 day warning
If Not Request.Params("NumberOfRecords") Is Nothing And Not Request.Params("NumberOfRecords") = "" Then
If Request.Params("NumberOfRecords") = "1" Then
strDorU = String.Format("{0} {1} {2}", Request.Params("NumberOfRecords"), Resource.Common_Activity, Resource.Bulk_Activity_Delete_Deleted)
Else
strDorU = String.Format("{0} {1} {2}", Request.Params("NumberOfRecords"), Resource.Common_Activities, Resource.Bulk_Activity_Delete_Deleted)
End If
Else
strDorU = "0 " & Resource.Common_Activity & " " & Resource.Bulk_Activity_Delete_Deleted
End If
strDateSearchFieldText = Resource.Bulk_Activity_Delete_Due
StartDt.CaptionText = "Begin Due Date"
EndDt.CaptionText = "End Due Date"
ddlUpdateBy.Visible = True
txtFsUpdateBy.Visible = False
Else
btnDelete.Text = Resource.Bulk_Activity_Delete_Undelete_List
ddlRadioDelete.Checked = "False" 'initialize the radios
ddlRadioUndelete.Checked = "True" 'initialize the radios
strDeleteOrUndelete = "undelete"
strUndeleteWarning = "<font color=red>" & Resource.Common_Warning & ":</font color> " & Resource.Bulk_Activity_Delete_Warning_Undelete
If Not Request.Params("NumberOfRecords") Is Nothing And Not Request.Params("NumberOfRecords") = "" Then
If Request.Params("NumberOfRecords") = "1" Then
strDorU = String.Format("{0} {1} {2}", Request.Params("NumberOfRecords"), Resource.Common_Activity, Resource.Bulk_Activity_Delete_Undeleted)
Else
strDorU = String.Format("{0} {1} {2}", Request.Params("NumberOfRecords"), Resource.Common_Activities, Resource.Bulk_Activity_Delete_Undeleted)
End If
Else
strDorU = "0 " & Resource.Common_Activity & " " & Resource.Bulk_Activity_Delete_Undeleted
End If
strDateSearchFieldText = Resource.Bulk_Activity_Delete_Update
StartDt.CaptionText = "Begin Update Date"
EndDt.CaptionText = "End Update Date"
ddlUpdateBy.Visible = False
txtFsUpdateBy.Visible = True
End If
End If
Page.DataBind()
backPage = Request.Params("backPage")
InitializeActionBar()
End Sub
Protected Sub ddlAssigned_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
generic_selectedIndexChanged()
End Sub
Protected Sub ddlActType_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
generic_selectedIndexChanged()
End Sub
Protected Sub ddlActStatus_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
generic_selectedIndexChanged()
End Sub
Protected Sub ddlActRank_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
generic_selectedIndexChanged()
End Sub
Protected Sub ddlUpdateBy_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
generic_selectedIndexChanged()
End Sub
Sub generic_selectedIndexChanged()
Dim strAssigned As String = ddlAssigned.SelectedItem.Value
Dim iStatus As Integer = ddlActStatus.SelectedItem.Value
Dim iType As Integer = ddlActType.SelectedItem.Value
Dim iRank As Integer = ddlActRank.SelectedItem.Value
Dim strUpdateBy As String = ddlUpdateBy.SelectedItem.Value
Dim vchStartDate As String = StartDt.DateText.Trim
Dim vchEndDate As String = EndDt.DateText.Trim
If ((Not IsDate(vchEndDate)) And (Not vchEndDate = "")) Then
strError = "endDate"
vchEndDate = String.Empty
End If
If ((Not IsDate(vchStartDate)) And (Not vchStartDate = "")) Then
strError = "startDate"
vchStartDate = String.Empty
End If
If ddlRadioDelete.Checked = False Then
strUpdateBy = txtFsUpdateBy.Value
End If
strArgsave = "&iSiteId=" & UserSiteId & "&strAssigned=" & strAssigned & "&iType=" & iType & "&iStatus=" & iStatus & "&iRank=" & iRank & "&StartDt=" & vchStartDate & "&EndDt=" & vchEndDate & "&DescLike=" & Server.UrlEncode(DescLike.Text) & "&RadioDorU=" & strRadioDorU
strArgs = "&iSiteId=" & UserSiteId & "&strAssigned=" & strAssigned & "&iType=" & iType & "&iStatus=" & iStatus & "&iRank=" & iRank & "&StartDt=" & vchStartDate & "&EndDt=" & vchEndDate & "&DescLike=" & Server.UrlEncode(DescLike.Text) & "&RadioDorU=" & strRadioDorU & "&strUpdateBy=" & strUpdateBy
End Sub
Function setSpecifiedUsers(ByVal iSiteId As Integer) As DataSet
Dim xData As DataSet = AppCache.RetrieveCacheValue(iSiteId, "AssignTo")
Dim oDataSet As New DataSet
oDataSet = xData.Copy()
Dim oNewRow As DataRow
oNewRow = oDataSet.Tables(0).NewRow
oNewRow("UsrName") = "" 'String.Empty
oNewRow("FullName") = "All Users"
oDataSet.Tables(0).Rows.InsertAt(oNewRow, 0)
Return oDataSet
End Function
Function setActStatus(ByVal iSiteId As Integer) As DataSet
Dim xData As DataSet = setDDLSource(iSiteId, "ActivityStatus")
Dim oDataSet As New DataSet
oDataSet = xData.Copy()
Dim oNewRow As DataRow
oNewRow = oDataSet.Tables(0).NewRow
oNewRow("iParameterId") = 0
oNewRow("vchParameterDesc") = "All Statuses"
oDataSet.Tables(0).Rows.InsertAt(oNewRow, 0)
Return oDataSet
End Function
Function setActRank(ByVal iSiteId As Integer) As DataSet
Dim xData As DataSet = setDDLSource(iSiteId, "ActivityRank")
Dim oDataSet As New DataSet
oDataSet = xData.Copy()
Dim oNewRow As DataRow
oNewRow = oDataSet.Tables(0).NewRow
oNewRow("iParameterId") = 0
oNewRow("vchParameterDesc") = "All Ranks"
oDataSet.Tables(0).Rows.InsertAt(oNewRow, 0)
Return oDataSet
End Function
Function setActType(ByVal iSiteId As Integer) As DataSet
Dim xData As DataSet = setDDLSource(iSiteId, "ActivityType")
Dim oDataSet As New DataSet
oDataSet = xData.Copy()
Dim oNewRow As DataRow
oNewRow = oDataSet.Tables(0).NewRow
oNewRow("iParameterId") = 0
oNewRow("vchParameterDesc") = "All Types"
oDataSet.Tables(0).Rows.InsertAt(oNewRow, 0)
Return oDataSet
End Function
Sub InvokeDelete()
Dim chUpdateBy As String = Context.User.Identity.Name
Dim strAssigned As String = ddlAssigned.SelectedItem.Value
Dim iStatus As Integer = ddlActStatus.SelectedItem.Value
Dim iType As Integer = ddlActType.SelectedItem.Value
Dim iRank As Integer = ddlActRank.SelectedItem.Value
Dim strUpdateBy As String = ddlUpdateBy.SelectedItem.Value
If ddlRadioDelete.Checked = False Then
strUpdateBy = txtFsUpdateBy.Value
End If
Dim _admin As New AdminDB()
_admin.delActivityListing(UserSiteId, strAssigned, strUpdateBy, iType, iStatus, iRank, StartDt.DateText, EndDt.DateText, DescLike.Text, chUpdateBy)
_admin = Nothing
strArgsave = "&iSiteId=" & UserSiteId & "&strAssigned=" & strAssigned & "&iType=" & iType & "&iStatus=" & iStatus & "&iRank=" & iRank & "&StartDt=" & StartDt.DateText & "&EndDt=" & EndDt.DateText & "&DescLike=" & Server.UrlEncode(DescLike.Text) & "&RadioDorU=" & strRadioDorU
strArgs = "&iSiteId=" & UserSiteId & "&strAssigned=" & strAssigned & "&iType=" & iType & "&iStatus=" & iStatus & "&iRank=" & iRank & "&StartDt=" & StartDt.DateText & "&EndDt=" & EndDt.DateText & "&DescLike=" & Server.UrlEncode(DescLike.Text) & "&RadioDorU=" & strRadioDorU & "&strUpdateBy=" & strUpdateBy
End Sub
Private Sub InitializeActionBar()
Master.ReskinActionBarMaster.PageTitle = "Bulk Activity Delete/Undelete"
If (Not backPage = String.Empty) Then
Dim page As String = Master.ReskinActionBarMaster.BackPageURL(backPage)
Master.ReskinActionBarMaster.RegisterBackEvent(Nothing, "javascript:doBack(""" + page + """);return false;")
End If
Master.ReskinActionBarMaster.RegisterSearchEvent(Nothing, "return doValidation();")
Master.ReskinActionBarMaster.RegisterHelpEvent(String.Concat(getBaseServer(), ConfigurationManager.AppSettings.Get("CrmHelpAdminToolsUrlBase"), "Bulk_Activity.htm"))
End Sub
End Class
markup:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="admin_bulk_activity_delete.aspx.vb" Inherits="DealerSocket.Web.admin_bulk_activity_delete" MasterPageFile="~/MasterPages/AdminReskinMaster.Master"
EnableExpiration="True" RequiredPermission="Admin DB Bulk Activity Delete" Strict="False" Explicit="True" Buffer="True" Trace="False" UICulture="Auto" Culture="Auto" %>
<%@ MasterType VirtualPath="~/MasterPages/AdminReskinMaster.Master" %>
<%@ Register TagPrefix="uc" TagName="DatePicker" Src="~/controls/uc_DatePicker.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<title>DealerSocket® | CRM |</title>
<link type="text/css" rel="Stylesheet" href="/Assets/DealerSocket/Admin/admin_menu.css" />
<link type="text/css" rel="Stylesheet" href="/Assets/TwitterBootstrap/3.1.1/css/bootstrap-3.1.1.min.css" />
<style media="screen" type="text/css">
input[type="button"] {
padding: 6px 12px;
}
.platformHeight {
height: 100% !important;
}
input[type=radio], input[type=checkbox] {
display: inline !important;
margin-right: 7px !important;
}
input[type="checkbox"] {
cursor: default;
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
#adminBulkActivityDelete {
margin-bottom: 0px !important;
}
}
#viewFullTextIframe {
height: 138px !important;
}
</style>
<script language="JavaScript" type="text/javascript">
$(function () {
var postMessageId = getParameterByName("postMessageId");
if (postMessageId > 0) {
$('iframe').addClass('platformHeight');
}
});
function doAddUser() {
location.href = "user_new.aspx?SocketId=" + <%=UserSiteId%> + "&userId=0";
return;
}
function SetCulture() {
var currentCulture = document.getElementById("<%=hdnCulture.ClientID%>").value;
if (currentCulture == 'zh-cn' || currentCulture == 'es-es') {
currentCulture = 'en-us';
}
return currentCulture;
}
function doValidation() {
var currentCulture = SetCulture();
var Startdt = $('input[name*="StartDt$IntntlDatePick"]').val();
var Enddt = $('input[name*="EndDt$IntntlDatePick"]').val();
if (!isValidDate(Startdt, currentCulture)) {
showWarningRibbon("Please enter a valid Begin <%=strDateSearchFieldText%> Date.");
return false
}
else if (!isValidDate(Enddt, currentCulture)) {
showWarningRibbon("Please enter a valid End <%=strDateSearchFieldText%> Date.");
return false
}
if (Startdt.length > 0) {
if (Enddt.length > 0) {
if (currentCulture === "en-au" || currentCulture === "en-nz") {
if (compareDates(Startdt, "dd/MM/yyyy", Enddt, "dd/MM/yyyy") === 1) {
showWarningRibbon("End <%=strDateSearchFieldText%> Date must be greater than Begin <%=strDateSearchFieldText%> Date.");
return false;
}
}
else {
if (compareDates(Startdt, "MM/dd/yyyy", Enddt, "MM/dd/yyyy") === 1) {
showWarningRibbon("End <%=strDateSearchFieldText%> Date must be greater than Begin <%=strDateSearchFieldText%> Date.");
return false;
}
}
}
}
return true;
}
function doBack(backPageUrl) {
self.location.href = backPageUrl;
}
function doDelete() {
var question = 'Are you sure you want to ' + '<%=strDeleteOrUndelete %> ' +
'these activities?';
openConfirmationModalWithButtons(question, [ModalButtonEnum.YES, ModalButtonEnum.NO]);
}
function checkSend(vchError) {
if (vchError == 'startDate') {
showWarningRibbon("Please enter a valid Begin <%=strDateSearchFieldText%> Date.");
return;
} else if (vchError == 'endDate') {
showWarningRibbon("Please enter a valid End <%=strDateSearchFieldText%> Date.");
return;
} else if (vchError == 'deleted') {
showNotificationRibbon("<%=strDorU %>.")
return;
}
}
$(function () {
if (postMessageId > 0) {
$('.platformHeight').css('width', '100%');
$('.labelwarning').css('margin-top', '35px');
}
});
//apply filter on press of enter key in input field.
function applyFilter(event) {
if (event.which == 13) {
if (doValidation())
__doPostBack('Imagebutton2', '');
}
}
$(document).ready(function () {
checkSend('<%=strError%>');
});
function setRadioDorU() {
var ddlRadioDelete = document.getElementById("<%=ddlRadioDelete.ClientID%>");
var ddlRadioUndelete = document.getElementById("<%=ddlRadioUndelete.ClientID%>");
var hdRadioDorU = $("#<%=hdRadioDorU.ClientID%>");
$("#hdnRadioChange").val("1");
if (ddlRadioDelete.checked) {
hdRadioDorU.val(ddlRadioDelete.defaultValue);
} else {
hdRadioDorU.val(ddlRadioUndelete.defaultValue);
}
}
function resize() {
var heights = window.innerHeight;
document.getElementById("AdminUserGrid").style.height = heights - 530 + "px";
var bulk_activity = document.getElementById("AdminUserGrid").contentWindow || document.getElementById("AdminUserGrid").contentDocument;
if (bulk_activity.document) {
var tempHeight = document.getElementById("AdminUserGrid").offsetHeight - bulk_activity.document.getElementById("div_grid").offsetHeight;
bulk_activity.document.getElementById("div_grid").style.height = bulk_activity.document.getElementById("div_grid").offsetHeight + tempHeight - 8 + 'px';
}
}
window.onload = function () {
resize();
if ($("#totalRows").text() != "0")
$('#btnDelete').removeClass('disabled');
};
function doDeleteActivities() {
var sVal = "<%= strArgsave %>";
var findElement = document.getElementById("<%=txtFsUpdateBy.ClientID%>");
var FSValue = '';
var sUpdateBy;
var currentCulture = SetCulture();
if (!(findElement == null)) {
FSValue = findElement.value;
sUpdateBy = FSValue
}
var findddl = document.getElementById("<%=ddlUpdateBy.ClientID%>");
var selected;
var selectedValue = '';
if (!(findddl == null)) {
selected = findddl.selectedIndex;
selectedValue = findddl.options[selected].value;
sUpdateBy = selectedValue;
}
sVal = sVal + "&resultSet=y&strUpdateBy=" + sUpdateBy;
sVal = sVal + "&NumberOfRecords=" + $('#AdminUserGrid').contents().find('#hdnNumberOfRows').val() + "&backPage=" + '<%=backPage%>'
var Startdt = $('input[name*="StartDt$IntntlDatePick"]').val();
var Enddt = $('input[name*="EndDt$IntntlDatePick"]').val();
if ((isValidDate(Startdt, currentCulture) == false) && (Startdt != '')) {
showWarningRibbon("Invalid Begin <%=strDateSearchFieldText%> Date.");
Startdt.focus();
} else if ((isValidDate(Enddt, currentCulture) == false) && (Enddt != '')) {
showWarningRibbon("Invalid End <%=strDateSearchFieldText%> Date.")
Enddt.focus();
} else if ((document.getElementById("<%=ddlRadioUndelete.ClientID%>").checked == true) && (FSValue == '')) {
showWarningRibbon('<%= DealerSocket.Core.Globalization.Resource.Bulk_Activity_Delete_Alert_Enter_UpdatedBy%>.');
document.getElementById("<%=txtFsUpdateBy.ClientID%>").focus();
} else {
location.href = getRoot() + "/admin/xt_admin_bulk_activity_del.aspx?" + sVal;
}
return;
}
function modalClosedCallBack(returnData) {
if (returnData === "yes") {
doDeleteActivities();
}
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="Server">
<input id="hdnCulture" type="hidden" name="hdnCulture" runat="server" clientidmode="Static" />
<input id="hdnRadioChange" type="hidden" name="hdnRadioChange" value="0" runat="server" clientidmode="Static" />
<div id="adminBulkActivityDelete" style="margin-bottom: 18px;">
<div class="ws-detail-view-content-group">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">
<asp:Literal runat="server" ID="ltrFilters" Text="Filters"></asp:Literal>
</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-7 form-group">
<label class="labelwarning"><%= DealerSocket.Core.Globalization.Resource.Bulk_Activity_Delete_Choose_Action%> (<%=strUndeleteWarning %>):</label>
</div>
<div class="col-xs-5">
<input type="hidden" id="hdRadioDorU" name="hdRadioDorU" runat="server" />
<div class="radio-inline form-group">
<asp:RadioButton ID="ddlRadioDelete" CssClass="borderless" Text="<%$ ExternalResources:DealerSocket.Core|Globalization.Resource, Common_DeleteCap %>" GroupName="RadioDorU" runat="server" AutoPostBack="true" onchange="setRadioDorU()" />
</div>
<div class="radio-inline form-group">
<asp:RadioButton ID="ddlRadioUndelete" CssClass="borderless" Text="<%$ ExternalResources:DealerSocket.Core|Globalization.Resource, Common_UndeleteCap %>" GroupName="RadioDorU" runat="server" AutoPostBack="true" onchange="setRadioDorU()" />
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-3 col-md-6 col-lg-3 form-group">
<label for="assignedTo"><%= DealerSocket.Core.Globalization.Resource.Common_Assigned_To%> </label>
<asp:DropDownList ID="ddlAssigned" CssClass="form-control" OnSelectedIndexChanged="ddlAssigned_SelectedIndexChanged"
data-toggle="dropdown" runat="server" />
</div>
<div class="col-xs-12 col-sm-3 col-md-6 col-lg-3 form-group">
<label for="type"><%= DealerSocket.Core.Globalization.Resource.Common_Type%> </label>
<asp:DropDownList ID="ddlActType" CssClass="form-control" OnSelectedIndexChanged="ddlActType_SelectedIndexChanged"
data-toggle="dropdown" runat="server" />
</div>
<div class="col-xs-12 col-sm-3 col-md-6 col-lg-3 form-group">
<label for="status"><%= DealerSocket.Core.Globalization.Resource.Common_Status%> </label>
<asp:DropDownList ID="ddlActStatus" CssClass="form-control" OnSelectedIndexChanged="ddlActStatus_SelectedIndexChanged"
data-toggle="dropdown" runat="server" />
</div>
<div class="col-xs-12 col-sm-3 col-md-6 col-lg-3 form-group">
<label for="rank"><%= DealerSocket.Core.Globalization.Resource.Common_Rank%> </label>
<asp:DropDownList ID="ddlActRank" CssClass="form-control" OnSelectedIndexChanged="ddlActRank_SelectedIndexChanged"
data-toggle="dropdown" runat="server" />
</div>
</div>
<div class="row">
<div id="divStartDt" class="col-xs-12 col-sm-3 col-md-6 col-lg-3 form-group">
<uc:DatePicker ShowClearButton="true" CaptionText= "Start Date" ID="StartDt" runat="server"></uc:DatePicker>
</div>
<div id="divEndDt" class="col-xs-12 col-sm-3 col-md-6 col-lg-3 form-group">
<uc:DatePicker ShowClearButton="true" CaptionText="End Date" ID="EndDt" runat="server"></uc:DatePicker>
</div>
<div class="col-xs-12 col-sm-3 col-md-6 col-lg-3 form-group">
<label for="descriptionLike"><%= DealerSocket.Core.Globalization.Resource.Bulk_Activity_Delete_Description_Like%> </label>
<asp:TextBox ID="DescLike" CssClass="form-control" runat="server" placeholder="" onKeyDown="applyFilter(event)" />
</div>
<div class="col-xs-12 col-sm-3 col-md-6 col-lg-3 form-group">
<label for="updatedBy">Updated By</label>
<asp:DropDownList ID="ddlUpdateBy" CssClass="form-control" OnSelectedIndexChanged="ddlUpdateBy_SelectedIndexChanged"
data-toggle="dropdown" runat="server" />
<input id="txtFsUpdateBy" type="text" class="form-control" name="txtFsUpdateBy" runat="server" />
</div>
</div>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">
<asp:Literal runat="server" ID="Literal1" Text="Search Results"></asp:Literal>
</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<h3 style="float: left; font-size: 14px">
<!--the amount of rows number to be dynamic-->
<asp:Literal runat="server" ID="Literal2" Text="Total Rows :"></asp:Literal>
<span id="totalRows"></span>
</h3>
</div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<asp:Button ID="btnDelete" OnClientClick="doDelete();return false;" CssClass="btn btn-secondary pull-right disabled" ClientIDMode="Static"
Text="<%$ ExternalResources:DealerSocket.Core|Globalization.Resource, Bulk_Activity_Delete_Delete_List %>" runat="server" UseSubmitBehavior="false" />
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<iframe id="AdminUserGrid" scrolling="no" src="admin_bulk_activity_delete_grid.aspx?<%=strArgs%>" name="AdminUserGrid"
frameborder="0" width="100%"></iframe>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="../javascript/platform.js"></script>
<%@ Register TagPrefix="DS" TagName="Analytics" Src="~/controls/GoogleAnalyticsTracking.ascx" %>
<DS:Analytics ID="GoogleAnalytics" runat="server" />
</asp:Content>






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
uc_DatePicker2 is the correct one, and it resides in a solution separate from the one in which the admin..delete.aspx file reides in.
I recently pulled down new code from git and it does not have my attempt to Register the external web user control in the markup or the codebehind.
How difficult would it be for you to create a small example of how one solution can use a DLL from another solution, but the 2 solutions have no knowledge of each other?
For example, in Visual Studio, you can use the controls provided by 3rd party vendors, like Telerik. Â What would be the process for me to consume the Telerik control?
This is the same situation, except I am writing the web user control myself and trying to include it in another solution, but I get all the errors messages above when I try.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Parent.Default" %>
<%@ Register Namespace="Child" Assembly="Child" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<div>
Parent web form
</div>
</body>
</html>

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
In my test, the ascx is in App_Web_0tcaeix_.dll, and my Register line is like this:
<%@ Register TagPrefix="uc" Namespace="myctrl" Assembly="App_Web_0tcaeix_" %>
Parent markup:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Parent.Default" %>
<%@ Register TagPrefix="uc" Namespace="Child" Assembly="Child" %>
<%--<%@ Register TagPrefix="uc" Namespace="myctrl" Assembly="App_Web_0tcaeix_" %>--%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<div>
Parent web form
<uc:Child FirstName="Tom" runat="server"/>
</div>
</body>
</html>
And I get this error:
So why is the code file being asked for?






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
.NET Programming
--
Questions
--
Followers
Top Experts
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.