Imports System.Web
Imports Telerik.Web.UI
Partial Class MARS3MainMenu
Inherits System.Web.UI.Page
Dim security As New Security
Dim sess As New GlobalProperties
Dim da As New DataAccess
Dim menuInfo As New DataTable
Dim securityLoginRole As String = String.Empty
Dim WithEvents marsMenu As New RadMenu
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
Dim computerName As String = Environment.MachineName.ToString()
' =================================================================
' IMPORTANT
' In order for the System.Web.HttpContext.Current.User.Identity.Name.ToString()
' to pull the loggin name of the user the following needs to be changed on the
' IIS server running the website:
' Under Authentication 'Anonymous Authentication must be disabled and
' 'Windows Authentication must be enabled.
' If this is not done, no user information will be returned.
Dim userName As String
userName = System.Web.HttpContext.Current.User.Identity.Name.ToString()
' =================================================================
Dim userLength As Int32 = userName.Length
Dim userIndexOf As Int32 = userName.IndexOf(Chr(92)) + 1
userName = userName.Substring(userIndexOf, userLength - userIndexOf)
Dim userInfo As New DataTable()
userInfo = security.GetMARSUserInformation(userName)
Dim userInformation As String = userInfo.Rows(0)("FullName")
securityLoginRole = userInfo.Rows(0)("MARSGroupName")
If String.IsNullOrEmpty(userInformation) Or String.IsNullOrEmpty(securityLoginRole) Then
Response.Redirect("MARS3LoginErrorPage.aspx")
End If
sess.UserLoggedIn = True
sess.UserLogin = userName
sess.UserName = userInfo.Rows(0)("FullName")
sess.UserID = userInfo.Rows(0)("SalesID")
sess.UserRole = securityLoginRole
Master.MenuButtonVisible = False
Master.LabelReportBeingRun = "Main Menu"
' sess.UserRole
PopulateMenu()
End If
End Sub
Private Sub PopulateMenu()
AddHandler marsMenu.ItemClick, AddressOf marsMenu_ItemClick
marsMenu.Flow = ItemFlow.Vertical
menuInfo = da.BuildMenuInformation()
For Each row As DataRow In menuInfo.Rows
Dim hierarchyLevel As Int16 = Convert.ToInt16(row("HierarchyLevel"))
Dim item As RadMenuItem
Select Case hierarchyLevel
Case 1
If row(securityLoginRole) = "Y" Then
Dim level1 As RadMenuItem = New RadMenuItem(row("ItemName").ToString())
level1.Value = row("ItemID").ToString()
marsMenu.Items.Add(level1)
End If
Case 2
If row(securityLoginRole) = "Y" Then
Dim level2 As RadMenuItem = New RadMenuItem(row("ItemName").ToString())
level2.Value = row("ItemID").ToString()
item = marsMenu.FindItemByValue(row("ParentLevel").ToString())
item.Items.Add(level2)
End If
Case 3
If row(securityLoginRole) = "Y" Then
Dim level3 As RadMenuItem = New RadMenuItem(row("ItemName").ToString())
level3.Value = row("ItemID").ToString()
item = marsMenu.FindItemByValue(row("ParentLevel").ToString())
item.Items.Add(level3)
End If
End Select
Next
Panel1.Controls.Add(marsMenu)
End Sub
Protected Sub marsMenu_ItemClick(ByVal sender As Object, ByVal e As RadMenuEventArgs) Handles marsMenu.ItemClick
iFrame1.Attributes("src") = "SearchOptions.aspx"
End Sub
End Class
ASPX Page:
<%@ Page Language="VB" MasterPageFile="~/MasterPageReports.master" AutoEventWireup="true"
Inherits="MARS3_VBNET.MARS3MainMenu" Title="MARS Main Menu" CodeBehind="MARS3MainMenu.aspx.vb" %>
<%@ Register Src="CustomControls/ReportOptions.ascx" TagName="ReportOptions" TagPrefix="uc1" %>
<%@ Register Src="CustomControls/ReportSearchCriteria.ascx" TagName="ReportSearchCriteria"
TagPrefix="uc2" %>
<%@ MasterType VirtualPath="~/MasterPageReports.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<style type="text/css">
.style6
{
width: 203px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table cellpadding="3px">
<tr>
<td>
<asp:Label ID="lblReportingOptions" runat="server" Text="Report Menu" Width="124px"
Font-Underline="true"></asp:Label>
</td>
</tr>
<tr>
<td valign="top">
<asp:Panel ID="Panel1" runat="server">
</asp:Panel>
</td>
<td>
<asp:Label ID="Label2" runat="server" Text="Microage" Width="150" ForeColor="White" ></asp:Label>
</td>
<td>
<iframe id="iFrame1" width="755" height="490" runat="server" ></iframe>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="MicroAge" Visible="false"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Button ID="Button1" runat="server" Text="Submit" CssClass="btnGradientRed" />
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<br />
</asp:Content>
Hi,
RadSplitter height 100% is not working.The requirement is there should not be Scroll bar.Insead scroll bar the splitter should increase the height based on content in the user control. Please see the below code and suggest me how to make the splitter to change its height based on its data in the user control.
Please look the attached jpg file.
<%@ Page Language="C#" %> <%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI, Version=2009.3.1314.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Testled Page</title> <style type="text/css"> html, body, form { height: 100%; margin: 0px; padding: 0px; } </style> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%"> <telerik:RadSplitBar ID="Radsplitbar1" runat="server"></telerik:RadSplitBar> <telerik:RadPane ID="MiddlePane1" runat="server" Scrolling="None"> <telerik:RadSplitter ID="Radsplitter2" runat="server" Orientation="Horizontal" VisibleDuringInit="false" ResizeWithParentPane="true"> <telerik:RadSplitBar ID="Radsplitbar3" runat="server"></telerik:RadSplitBar> <telerik:RadPane ID="Radpane2" runat="server"> <!--User control -->
<!-- for testing i have given these dummy data --> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> <table border="1"><tr><td>Test</td></tr></table> </telerik:RadPane> </telerik:RadSplitter> </telerik:RadPane> <telerik:RadSplitBar ID="RadSplitBar2" runat="server"></telerik:RadSplitBar> <telerik:RadPane ID="EndPane" runat="server" Width="22px" Scrolling="None"> <telerik:RadSlidingZone ID="Radslidingzone1" runat="server" Width="35px" ClickToOpen="true" SlideDirection="Left"> <telerik:RadSlidingPane ID="Radslidingpane5" Title="Analysis Period" runat="server" Width="275px"> <!--User control --> </telerik:RadSlidingPane> <telerik:RadSlidingPane ID="Radslidingpane6" Title="Trend Builder" runat="server" Width="250px"> <!--User control --> </telerik:RadSlidingPane> <telerik:RadSlidingPane ID="Radslidingpane4" Title="Configuration Settings" runat="server" Width="250px"> <!--User control --> </telerik:RadSlidingPane> <telerik:RadSlidingPane ID="Radslidingpane7" Title="SmartSupport" runat="server" Width="275px"> <!--User control --> </telerik:RadSlidingPane> </telerik:RadSlidingZone> </telerik:RadPane> </telerik:RadSplitter> </form> </body> </html>
Please Suggest me how to solve this problem.
With regards,
Marees
Email:m.arunachalam@shell.com
Hi.
In the fileExplorer, if you change a filename but only change the case of the name eg:
myfile.txt
To
MYFILE.txt
then the changes are not saved as it thinks the file already exists (it does in essence as I know it is trying to perform a move on the file, not a rename).
Is there a way to allow this so that if a file is uploaded with a filename that has the wrong case it can be changed?
