C# - Adding Font To A CSS Page?
Jan 18, 2011I have a font I downloaded and I'm trying to apply that font to my site.
so I simply used font-family but my font isn't there(obviously)
I have a font I downloaded and I'm trying to apply that font to my site.
so I simply used font-family but my font isn't there(obviously)
Is it possible to change the font and font size of the data in the dropdown of a Combobox?
I've tried;
.CustomComboBoxStyle .ajax__combobox_itemlist li {
width: 150px;
font-family:Verdana;
font-size:smaller;
}
and setting the CssClass to it, but doesn't affect the font. I can adjust the width of the dropdown object, but I need to change that gawd awful font.
I use this class for my DropDownList
.DPCDDL {
float:left;
width:200px;
height:20px;
margin-top:1px;
font:bold 12px Tahoma;
}
In my dropdownlist just selected item font be (bold 12px)
I want that all item that are in my dropdownlist font be bold 12px how i can do it?
Just upgraded from SSRS 2005 to 2008 (on a test server). I have a report with a list and in this list are about a dozen fields in textboxes whose fonts are all set to Verdana 8pt. When I run the report from the Report Manager, one of the 12 fields is displaying in a serif font (like Times New Roman) at around 12pt. When I preview the report in Visual Studio every field looks fine and when I run the same report in SSRS 2005 every field looks fine. Has to be a SSRS 2008 bug!
View 3 Repliesthere is two properties under font area for web control What is use of Names as Name set the value of font.
View 2 Repliespoint me to information regarding getting font metrics from a true type font in C#? I need to split some text from an RSS feed for a given box height and width.
I've checked System.Drawing.Font and GetHeight is there but how do I get the width of a character?
I understand each character is rendered as a glyph but not sure which class will get the width of the character?
I have questions relating to specifying font-sizes in web page.Is it ok to specify it as style='font-size:12px' or style = 'font-size:14pt' or there is a better way to do this? I want to be sure that I get a uniform cross-browser solution to font-sizes.
View 2 RepliesCould you tell me how I can set from code-behind of the Master page font size for all GridViews of my application body?
E.g. I have
[code]....
i have a asp.net aspx page, which references a css file,have the font size defined in css as 2em;
want to give option to user to change this to any value he wishes
irrespective of the bad effect to display format
question, ways to achieve it easily, efficiently and the most simplest way possible
note,way should support all browsers
I had developed mobile web page in asp.net 2.0. This page is displaying with small font in safari on ipod touch and in iphone. for this i had copied iphone.browser definition file in
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727CONFIGBrowsers
folder and run the command aspnet_regbrowsers.exe -i in command prompt. Then 2 files with ASP.BrowserCapsFactory.dll and BrowserCapsFactory.cs are created. But there is no result.
I am using TabContainer with some controls on each tab (asp: labels, text boxes). When redirecting to the page that contains the TabContainer, the tabs and their content loads as expected, but when there is a postback, and the page refreshes, the TabContainer UI changes - the font size of the labels gets bigger, the text boxes become bigger and their location changes a bit (not aligned as before), and the tab header is partially hidden. I am using IE7.
I dont know if this is relevant but in some of the text boxes i use edit mask extender as well for date. Also, I have used a table inside the TabContainer for layouting the controls.
My master page looks like:
<head runat="server">
<title>
<asp:ContentPlaceHolder ID="PageTitlePlaceHolder" runat="server" />
</title>
Content pages look like:
<asp:Content ID="TitleContent1"
ContentPlaceHolderID="PageTitlePlaceHolder" runat="Server">
My Page
</asp:Content>
This works by placing the content page specific title on the page ("My Page" in this example). Now I want to add a global prefix to the title in my master page for the site name. So I want:
<head runat="server">
<title>
Example.com:
<asp:ContentPlaceHolder ID="PageTitlePlaceHolder" runat="server" />
</title>
However, when I do this content pages are still rendered without "Example.com" in the tile, it's like it's ignored.
Why is this happening and how can I achieve this?
Is there any way to inject JQuery into every page on an ASP.Net site without adding the script tag to every page individually?
View 3 RepliesI need to add Meta tags, description and keywords in aspx page. My aspx pages are in master page and I have already added meta tags and description in my Master Page.
Now I want add in my other pages also so if someone search my site on GOOGLE it should look like same as this:
[URL] ...
How to achieve this?
Ok, so I'm adding linkbuttons to a page dynamically on page_load.I had it to where the link buttons were redirecting to a page with a query string attached. I was attempting to use the AjaxToolKit's AjaxFileUploader and ran into issues with existing query strings.
So what I'm trying to do now is handle the click event of the linkbutton server side, set 2 session variables and then redirect the page to the same page, but with out appending a querystring so the ajaxfileuploader will work correctly.Here is my linkbutton code:
vb Code:
Dim Lin As New LinkButton
Lin.Text = dr("DeptDesc").ToString
Lin.CssClass = "deptlink"
Lin.ToolTip = CDate(dr("MeetingDate").ToString).ToFileTime.ToString
'Lin.OnClientClick
[code]....
I know I have Lin.PostBackURL and Lin.setAttribute(...). It didn't work with just setAttribute and I saw a post online about someone setting the PostBackURL and it working...
I come from a windows dev environment so the web makes me feel like a big dummy.
I am using VS2008, VB.NET, 3.5 Framework, ASP.NET, AjaxControlToolkit.
I have included a screen shot that might help to look at while you read my attempt to explain my issue below!
I just recently discovered in a book here on my desk how to interact with a master page programmatically from a nested master page or a regular aspx child page. The method they describe makes sense and is familar to me because they use Public Properties on the master page to manipulate the GUI and controls on the master page. But since they are public, the child pages can see them and fire them off. Makes sense.
I thought I could use this method to do the opposite of that and have the master page fire off something (say a public property in a nested page) to have it then do some work and update things on that nested page.
For example,
I have a MASTERPAGE.MASTER. Under that, I have a LEFTNAV.MASTER (so its a nested master page). Then, under that I have my default.aspx page.
(I did that so that for some of my regular aspx pages I could just tie them directly to the master page so that they dont have a left navigation page...like for big charts or graphs, etc. Is that the best way for that by the way?)
So on the masterpage, I have just a simple asp.net search textbox and an asp.net search button. When they type something in and click search, I want it to add a tab to the AJAXControlToolkit - TabPanel that I have on the default.aspx page, then some other things such as update a datagridview there with the search results.
I can do all of this except the event firing and scope. I cannot see a way to make a button on the master page up top fire off an event that is on the default.aspx page to make it do what it needs to do.
What I tried doing was creating a public property on my default.aspx page. I have some actual code in the SET to do some GUI manipulation and change some stuff on the page. But on my master page within the search button's click event, I cannot see where to call this public property on the default.aspx page...
I'm trying to add some share this javascript in between the head tags of an asp.net page but only if the page is not secure (!Request.IsSecureConnection). How do I get the code in the head tags to check for secure connection and then write the javascript if not secure. I've tried using <% %> blocks and RegisterStartupScriptBlock and it's not working UPDATE: Was able to get it to work using this in the Page_Load
if(!Request.IsSecureConnection)
{
HtmlGenericControl Include = new HtmlGenericControl("script");
Include.Attributes.Add("type", "text/javascript");
Include.Attributes.Add("src", "http....");
this.Page.Header.Controls.Add(Include);
}
im tring to add style to master page the same way i add script
[code]....
the only way the css recognized is by adding the content to the master page
what am i doing wrong?
I have an existing page. I drag a text box control from the tool box onto the page. When I execute the application I get error (this happens to other additional controls as well):
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
At this point I do not have any errors.
Now when I reference the control in the code behind, it gives me error when I execute the application.
If TextBox2.Text = "" Then
mySqlCommand.Parameters.Add(New Data.SqlClient.SqlParameter("@GroupName", Data.SqlDbType.VarChar, 50)).Value = DBNull.Value
Else
mySqlCommand.Parameters.Add(New Data.SqlClient.SqlParameter("@GroupName", Data.SqlDbType.VarChar, 50)).Value = TextBox2.Text
End If
Error2Name 'TextBox2' is not declared.
Error3Name 'TextBox2' is not declared.
Is there a way to add custom attributes to @Page directive and also get design time support like intellisense for the same?
I have used Adding Custom Property to Page Directive in ASP.Net 2.0 as a pointer.
I would like to have a attribute which will give dev an option to select value from list. Something similar to EnableSessionState attribute. I do understand I need to define an enum for the values. But I cannot understand how to make it available during the design time.
I could use late events such as EndRequest and put inside Response.Write but this way whatever I'm adding would come after the /html tag and the HTML won't be well formed.
View 1 RepliesI have an aspx page which I am pasting the code from. This page is a preview gallery which when I create a new gallery in my admin panel it auto updates to this page and places the text name I assign in the admin and assigns a page link which takes users to the actual gallery page for that preview... for instance I log in as admin and select manage free gallery.. enter the gallery name (for example" free preview") upload 8 or 9 images and a slideshow then hit submit. The gallery is then created and a link to that gallery is placed on my page for all free galleries. I want to not only have a link but an actual thumbnail image for these.. how would I do this given the code I am pasting below? I would also be willing to just eliminate the text link and go with a clickable thumbnail with a short description under it which actually would probably look better anyway. Pasted ASPX Code follows:
ok so I cant post the code because I am new..
Do you know any drawback to add controls to a page on PreRender event?
I have an ASP.net page with dynamic content that are inside Controls, some of them custom controls and some of them regular ASP.net controls.
Is there a way to get those controls inside a Marquee? maybe an HTML Marquee? These controls are mostly built in this sense:
sometext
sometext
sometext
etc.
The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx)
my code:
<%@ Register Src="~/LoginControl.ascx" TagName="TagLogin" TagPrefix="Login" %>
<Login:TagLogin id="CtrlLoginControl" runat="server"></Login:TagLogin>
wats wrong over here. wat i need to add any more..?