How could I add a tooltip to a ext:FileUploadField control? I tried to assign a ToolTip for my Browse button like the below, but it's not working.
<ext:FileUploadField ID="FileUpload1" runat="server" Icon="BrowsePicture" ButtonText="" ButtonOnly="true" AutoPostBack="true">
<ToolTips>
<ext:ToolTip runat="server" ID="FileUpload1_TT" Title="Browse" Html="Browse"></ext:ToolTip>
</ToolTips>
<Listeners>
<FileSelected Fn="showFile" />
</Listeners>
</ext:FileUploadField>
You can set Target="#{FileUpload1}-file" on the <extTooltip>.
The following example demonstrates the full scenario.
Example
<%# Page Language="C#" %>
<%# Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!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>Ext.NET Example</title>
</head>
<body>
<ext:ResourceManager runat="server" />
<form runat="server">
<ext:FileUploadField ID="FileUpload1" runat="server" ButtonOnly="true" ButtonText="Select">
<ToolTips>
<ext:ToolTip runat="server" Title="Browse" Html="Browse" Target="FileUpload1-file" />
</ToolTips>
</ext:FileUploadField>
</form>
</body>
</html>
Wrapping the string FileUpload1 with #{} will ensure the client-side .ID (.ClientID) is used to reference the correct instance of the <ext:FieldUploadField> object.
Hope this helps.
Related
I've just created a label in default.aspx page and created a skin in skinfile.skin. I've put the skin file in App_Themes folder, i've included the reference to that file in the < link > tag and i've mentioned the skin id for that label.
so according to the code, the label should have background as black and text as orange, right? But nothing's happening.
What i'm doin wrong here?
Here's the code:
Default.aspx:
<%# Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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></title>
<link rel="stylesheet" type="text/css" href="App_Themes/SkinFile/SkinFile.skin" />
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Text="Label" SkinID="LabelSkin"></asp:Label>
</div>
</form>
</body>
</html>
SkinFile.skin:
<asp:Label runat="server" SkinID="LabelSkin" BackColor="Black" Color="Orange">
</asp:Label>
i got this thing fixed. all i had to do was set the 'theme' attribute in the <%# Page.... Theme= "SkinFile" %> statement as the name of the folder in which the skin file is... ^_^
i added ajax combo box to my page, but i have 2 problems.
1- i can not type in that.
2- when i type in that , it automatically find matched words.
for example when i type "j" , it finds "jack".
<%# Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%# Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<!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">
<div>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ComboBox ID="ComboBox1" runat="server" AutoCompleteMode="SuggestAppend"
DropDownStyle="DropDownList"
style="display: inline;">
<asp:ListItem>masoud</asp:ListItem>
<asp:ListItem>jack</asp:ListItem>
</asp:ComboBox>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
Is your browser Firefox? If so, you may have to change the MaxLength property of the ComboBox control to a value other than the default 0.
This link will show you how to use all of the ajax controls, look at the combo box one. And you can see which one you need then.
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ComboBox/ComboBox.aspx
That is a link to all of the ajax controls with samples.
as #CallumHolden said.. if you will set the dropdownstyle property to dropdown rather than dropdownlist it will work. this solved my problem as well.
I am working with Asp.Net 3.5 and Ext.Net 1.0.
I had created One Master Page(Site.master) and one content page(User.aspx) in my Application and I am loading one page(UserManager.aspx) into content page
If I put normal HTML tags into UserManager.aspx that works fine but if i put EXt.NET controls in it I wont work..
MasterPage
<ext:Panel ID="Panel6" runat="server" Region="Center" CollapseMode="Mini" Margins="0 0 4 4">
<Content>
<asp:ContentPlaceHolder ID="cntMainCenter" runat="server">
</asp:ContentPlaceHolder>
</Content>
</ext:Panel>
ContentPage
<ext:ButtonGroup ID="ButtonGroup1" runat="server" Title="" Columns="3">
<Items>
<ext:SplitButton ID="SplitButton1" runat="server"
Text="Users" IconCls="add" IconAlign="Top"
ArrowAlign="Bottom" Width="60" Scale="Large" RowSpan="3">
<Listeners>
<Click Handler="#{panel}.load('UserManager.aspx');" />
</Listeners>
</ext:SplitButton>
</Items>
</ext:ButtonGroup>
I am Loading UserManager.aspx Page in content on click of Content Page's Split Button.
<asp:Content ID="Content2" ContentPlaceHolderID="cntMainCenter" runat="server">
<ext:Panel runat="server" ID="panel" BodyBorder="false" Border="true" Title="Panel" >
<Items>
</Items>
</ext:Panel>
</asp:Content>
UserManager Page
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="SPA_SCHEDULER.test" %> <%# Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!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></title>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server">
</ext:ResourceManager>
<ext:Panel runat="server" Title="dfdf" Height="100" Width="100">
</ext:Panel>
</body>
</html>
If I write HTML Tags instead of EXT.Panel in UserManager.aspx page it will work fine but if i write EXT.NET any control it will not loaded.
You have to use iFrame or Merge mode for this. http://examples1.ext.net/#/Panel/Basic/AutoLoad/
I recommend you use iFrame mode, it's simple and very easy to use.
For example try this:
#{panel}.load({ url:"UserManager.aspx",scripts:true,mode:"iframe",showMask:true });
I add an onfocus event to a web user control (.ascx) expection it to raise event when it gets focus but it doesn't. Is it not intended to work this way and how can I get it to raise the event? Here is sample below, but it doesn't work.
<%# Control Language="vb" AutoEventWireup="false" CodeBehind="WebUserControl1.ascx.vb"
Inherits="RaiseEventUserControl.WebUserControl1" %>
<div style="padding: 5px; background-color: #C0C0C0">
TB1:
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<br />
TB2:
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</div>
<%# Register Src="WebUserControl1.ascx" TagName="WebUserControl1" 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 runat="server">
<title></title>
<script type="text/javascript">
function RaiseEvent(obj) {
alert("Event was raised for: " + obj.id)
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<uc1:WebUserControl1 ID="WebUserControl11" runat="server" onfocus="RaiseEvent(this)" />
<br />
<uc1:WebUserControl1 ID="WebUserControl12" runat="server" onfocus="RaiseEvent(this)" />
</div>
</form>
</body>
</html>
This can be achieved using jquery. In your head element, add the following:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('input[name^="WebUserControl"]').focusin(function () {
$(this).val("i have focus");
});
});
</script>
What this does is, grabs the input elements whose name starts with "WebUserControl" and adds a "got focus" event. The handler for that event places "i have focus" as the value for that input element.
The way that this would be rendered to the page is that a "onFocus" attribute would be added to the div that represents the control. This is not something that supports focus. You might add the "onFocus" item to say your first text field in the control or something similar to be able to raise the event if needed.
i trying to add some costume app into Dynamics CRM
basically i have an ASP.Net Page i show within an iframe inside the MS CRM.
when i try to do a submit using a button it opens a new window and shows the result there, i want it to stay in the iframe.
help.
this is the ASP.Net code:
<%# Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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></title>
</head>
<body>
<form id="form1" runat="server" target="_self">
<asp:Calendar ID="FromCalendar" runat="server"></asp:Calendar>
<asp:Calendar ID="ToCalendar" runat="server"></asp:Calendar>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
<asp:GridView ID="GridView1" runat="server" />
</form>
</body>
</html>
http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/bdf52a59-5751-4ada-8704-056bfec5e625