"<%=" Is Not Working Correctly Inside Head - Link Tag?

Dec 19, 2010

I have been trying to create dynamic path for my css files to allow statrup application regardless of application path. I have srtange behavious with <%=

[Code]....

I believe above should generate app path, but it looks <%= is ignored and the code on my webside looks like this

[Code]....

When I move <%=Request.ApplicationPath%> outside href attribute or move whole link tag to body it works fine

View 5 Replies


Similar Messages:

Web Forms :: Remove Link In The Head Tag Of Html Page?

Jan 3, 2011

remove link in the head tag of html page

[Code]....

View 2 Replies

Using Code Blocks In Head Content And Link Tags?

Feb 1, 2010

I'm building an asp.net app using themes, and I've assigned a theme to the app using the web config.

I have a bookmark icon that I want to use for my page and it is located in the themes directory, but I am having trouble referencing the themes location from a link tag in my header.

First I tried putting a code block inside the link tags href element, which did not work. Instead all it did was html encode the <% characters and output it directly to the browser:

<link rel="shortcut icon" href="/App_Themes/<%=Page.Theme %>/images/bookmark.ico" type="image/x-icon" runat="server"/>

I am able to put a code block inside an element in an hr tag though, so I don't know why it won't work in a link tag:

<hr test="<%=Page.Theme %>"/>

Then I tried doing a Response.Write inside the head tag, but I got an error saying the Controls collection cannot be modified because the control contains code blocks:

<% Response.Write("<link rel="shortcut icon" href="/App_Themes/" + Page.Theme + "/images/bookmark.ico" type="image/x-icon"/>"); %>

I also tried it just with a string literal, and got the same error:

<%= "<link rel="shortcut icon" href="/App_Themes/" + Page.StyleSheetTheme + "/images/bookmark.ico" type="image/x-icon"/>" %>

Is there any way to reference something from the themes directory inside the link tag?

I'm trying to do this in both an ASP.NET 2 and an ASP.NET 2 MVC app.

View 3 Replies

Visual Studio :: Remove The <head></head> Tag From And All Information Contained In The Tag

Mar 11, 2010

I have several hundred html files that I want to remove the <head></head> tag from and all information contained in the tag. I am fairly sure I can do this in Visual Studio using the Find and Replace In Files with REGEX.

View 5 Replies

Why Does URLs Get Encoded In <link> Tags Within <head Runat="server"> And How To Avoid It

Jan 4, 2011

(I have tested this with a vanilla asp.net site running from the webdev server and it is a problem here also):

I have the following markup in my .master file

[code]....

Clearly Asp.Net does something to encode the url. As it happens, I really need the head tag to be runat="server" and I would also like to be able to have "&" in link-urls within it is there some trick I can use to have my cake and eat it too?

View 2 Replies

Cart32 Working Correctly?

Feb 2, 2011

I know this may not be the place, but can anyone provide me with good cart32 support forums or something that people actually check on a daily basis like this forum?I have posted in the yahoogroups for cart32, i have asked for help from the host and cant get good help on this issue.Trying to work with Shipping Types and trying to handle from the code side doesnt work and from the cart configuration doesnt work as expected.. My original post on the other forum can be seen here: [URL]

View 2 Replies

Update Panel Not Working Correctly?

Apr 24, 2010

I have added two update panels to my page. I'm trying to update the first panel but not the second. The second panel contains validation controls which seem to be kicking in no matter what I try.

<asp:ToolkitScriptManager runat="server" ID="ScriptManager" />
<asp:UpdatePanel ID="updatePnl" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:label ID="NoConsignments" runat="server" ForeColor="red" />

[Code]....

I've left out some of the middle code of there is alot.

View 5 Replies

Web Forms :: File Upload Not Working Correctly?

Apr 1, 2010

I have a simple file input field that utilizes a File.Copy routine to move the file from the local store to the server. This part of the application works fine in staging but in production I had to establish a work around in order to get it to work. I have the users do a Save As on the file they want to upload and then slightly change the name of the file and then it will upload. I do not have to do this in staging with the same file in order for it to work. I am racking my brain as to whether this is a permissions issue or code issue or what.

View 4 Replies

Web Forms :: HtmlEncode() And HtmlDecode() Not Working Correctly?

Dec 20, 2010

I have a url which I wish to encode that contains a couple of encrypted querystring parameters:

[URL]

I've been asked by a client I'm working with to html encode this url. I've used HttpUtility.HtmlEncode() to do this. This returned the following:

[URL]

This appears to be correct as the '&' has been replaced with '&'. However a problem arises when I try to use HttpUtility.HtmlDecode() on this new value as I get the following returned:

[URL]

What appears to have occurred is the '&' has had the 'amp' removed and the ';' has been html encoded (I checked the value of '%3b' and it corresponds with the html encoded value of a semi-colon). I'm not sure why this is happening?

I realise I could manually do a .Replace("%3b", "") as a temporary fix but I can't see this being a good long-term solution.

View 4 Replies

Ajax Combobox Doesn't Display Correctly When Inserted Inside A Tab Control

Apr 29, 2010

I have a display problem when I try to use a ajax combobox inside a tab control: when my tab control loads on the page where the combobox is, everything works fine; however, if it loads on a another page, the you change to the page which contains the combobox, the right button (which opens the list of the combobox) isn't displayed at all.

View 1 Replies

JQuery :: Firefox Doesn't Render Correctly Inside Modal Dialog

Jan 19, 2011

I have tried searching for the answer but have failed to get any insight into this problem. Look at the following two examples. [URL] (JQuery modal dialog without <input> element) Above pages have very simple JQuery modal dialog, whihc displays correctly in IE, Chrome, Safari and Opera. Unfortunately, Firefox does not display the modal dialog with <input> correctly. It displays the other one correctly. I have tried the following without resolution to this peculiar problem:

- Changed doctype
- Used <table> to enclose <input>
- Used <div> to enclose <input>
- Used all possible CSS display attributes for <input>

View 2 Replies

Web Forms :: Drop Down List SelectedIndexChanged Not Working Correctly

Feb 2, 2010

I've got a form with 3 drop down lists. If I choose a report on the Actions DDL, which displays a sql report as a pdf, then select an item in one of the other DDL's, the SelectedIndexChanged event for the Actions DDL is fired again. I can't get the other DDL's SelectedIndexChanged event to fire.

[Code]....

View 1 Replies

Web Forms :: Master Page Properties Not Working Correctly?

Feb 3, 2010

In my default.aspx I have;

<%@ Page Title="" Language="VB" MasterPageFile="~/masterpage.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" AspCompat="true" %>
<% @ MasterType VirtualPath ="~/masterpage.master" %>

I have setup properties, for example;

Private _theskin As String
Public Property theskin() As String
Get
Return _theskin
End Get
Set(ByVal value As String)
_theskin = String.Empty
End Set
End Property

I was then expecting to be able to access these properties from the default.aspx.vb page in this way;

If Master.theskin = foo Then
do things
End if

In the default.aspx.vb the code is highlighted with blue underline and says;

theskin is not a member of system.Web.Ui.Masterpage

Am I making an error somewhere along the line? Do I need to do more to be able to expose the properties to default.aspx.vb?

View 2 Replies

Web Forms :: How To Get AutoPostBack Working Correctly With User Control

Jun 8, 2010

I have an AJAX enabled ASP.Net 3.5 app in which I have:

A Master PageA Web Content PageA User ControlMore precisely, there's a Placeholder control in the Web Content Page into which one of many User Controls are loaded (one at a time or none at all).

The basic User Control I'm working with has a bunch of Labels and one DropDown ListBox. The latter control is a date selector - ie. June 2010, May 2010, April 2010, etc. When the user changes the date, since AutoPostBack = true for the control, a PostBack occurs. But when this happens, the User Control disappears!

All I want is for a partial postback to occur so that I can use the new date to repopulate the various Label controls. I even put the Placerholder control in its own UpdatePanel but this didn't resolve anything - the User Control still disappeared.

View 7 Replies

Web Forms :: Textbox In The Form But Text_changed Not Working Correctly?

Oct 22, 2010

I got a textbox in my form and I want to when a user start typing in the textbox the listbox below the textbox will select the item that starts with that string

for example, it i type I

than in myserver side code will call that SearchString method which will go through that listbox and do the rest...

protected void CountryTxt_TextChanged(object sender, EventArgs e)
{
string s = CountryTxt.Text;
SearchString(s);
}

the problem is it only stops in the textchanged after I press the enter key; it doesn't seem to work just by typing the characters in the textbox...

<asp:TextBox ID="MachineTxt"
runat="server" Width="42px"
ontextchanged="CountryTxt_TextChanged" AutoPostBack="True"> </asp:TextBox>

View 4 Replies

Forms Data Controls :: Button Event Inside ListView Is Not Triggering Correctly?

Mar 16, 2011

I have a ListView (table inside) and it's first row are some TextBoxes for filtering actions.

In the last column I have a button that calls my Search function and filters the records according to the inputs.

[Code]....

My Search function for now only displays a text inside a Label at the top of the page.

When I load the page, I'm using ListViewPesquisa.DataBind() so it shows it's EmptyDataTemplate, but when I click the button inside the event isn't called at all. If I do put some data (any data) in the ListView and it shows it's LayoutTemplate instead, the event is called properly.

I can get around this issue by moving the filter line out of the table, but I'd like to know why is that the button inside the EmptyDataTemplate doesn't work.

View 1 Replies

Forms Data Controls :: Formview Button Visibility Not Working Correctly?

Apr 17, 2010

I have a formview that displays user info from a dropdownlist. One account may have many users, but one account Primary. I am trying to disable the Edit/Delete button in the formview if the selected ID is the account primary. The problem I get is this.

Step 1: page_load - the primary user is displayed by default, but the delete button is enabled - not right

Step 2: I use the dropdownlist to select another user (not the primary) - everything's fine

Step 3: I then select the Primary User, the Delete Button is disabled - perfect

Step 4: select another user, delete button still disabled - Not right.

[Code]....

1. As you can see my sqlSelect Parameters are bound to the DropDownList.SelectedValue, but is t seems like my if statement for comparing selecteduser to varAdminID doesn't work except once.

So to help debug, i added a label control that displays the selected userID, but on page load the label is blank. but it displays the first record on the list anyway. so if this is the reason for not disabling the delete button on page load then why later does it not reable the button when the user is not the primary, and the UserID is displayed on the label and it is not the primary userid?

View 2 Replies

State Management :: The Service Seems Not Working Correctly - Application Pools Recycles The Application Loose The Session?

Jul 7, 2010

we are experiencing big difficulties in the configuration of ASP.Net state service and II7. The service seems not working correctly because when the application pools recycles the applicatio loose the session.If we try the same configuration in IIS6 it works correcly.What is the correct way to configure the aspnet session state service in iis7?

View 2 Replies

Security :: Link To Profile Inside Loginview?

Sep 23, 2010

I need to have a link inside my asp:Loginview that says "My profile" and links to the users profile. Am I ignorant :S ?

View 4 Replies

Web Forms :: Link Element Cannot Be Nested Inside Td

Jul 22, 2010

I include

<link href="../calendar/calendar.css" rel="stylesheet" type="text/css" />

tag in content page. But message "element link cannot be nested inside td". Then i put the code in form load as,

protected void Page_Load(object sender, System.EventArgs
e)
{ [code]....

View 4 Replies

Web Forms :: Catch Click From Link Inside Widget?

Aug 29, 2010

I have an ASP.NET (3.5) page. On the page there is a widget. Here is the page code:

[Code]....

The widget (script) displays a list of news from another website like this:

---------------------------------------------------------
title1 (as link)
short description
title2
short description
.............................................
---------------------------------------------------------

1. When a user clicks on one of the links in the above list I want to "catch" the link.

2. ISSUE: When the link (from the list) is clicked the URL is opened in another browser tab

3. If a user clicks on a link I want to redirect him not to the link's URL but to a page of my website.

I have tried using global.asax (application_beginrequest) but, since the link is opened in another tab that function is never reached. How to do this?

View 4 Replies

External Link Inside A Webform (using Master Page)?

Nov 17, 2010

am trying to get one of the webforms in my application to link to another website, outside of my application. I can get the page to load as a new webpage in my browser easily but I need to keep my masterpage in view.

View 1 Replies

JQuery :: Click Link Inside Iframe Using Javascript?

Jan 13, 2011

i need to put an IFrame in my page, this iframe page include a link with text "logout", the link didnot has an ID or Name tags.

<a href="http://wwww.www.com/logout">Logout</a>

how can i click this link from outside this Iframe using javascript?

View 2 Replies

MVC :: Enter Span Inside Link UsingHtml.ActionLink?

Jul 8, 2010

how could someone get the result of:

[Code]....

using Html.ActionLink<>?

View 3 Replies

AJAX :: Insert Link Inside HtmlEdit Control?

Jun 2, 2010

I wondered if there is a way to insert a link inside ajax htmlEdit control.

I found the button inside the htmlEdit - "Insert/Edit Url Link".

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved