.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Image background color is showing while i drag in content place holder in master page ???

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :ASP.Net

Hi  ...

I had few icons and images in my old web project which had no issue with the images and icons background color.

Now i have changed the total look and layout of my web site. After doing so , my old images and icons as well as new images and icons backgroud color is also displaying in the image.

The same image is looking good in my old web site layout ...

I tried all the stuff to show only image not image background ... But , it is not happening ....

The main thing is the same images and icons background color is not showing in my old design ...

Look at the image background , it has grey color background. It was not happening in my old web site design

Plz help me to solve this .... 

View Complete Post

More Related Resource Links

Unique content within master page based on conditions met


 Hi all-

I would like to present users with unique content based on certain conditions being met as they land on the home page (default.aspx).  The condition logic will be in the VB code behind Page Load event. The content will go in a content placeholder as specificed from the master page. 

However, the content change wouldn't be something small (ie making a panel or label visible or not) but rather it will be different HTML,  Divs and databound gridview content.  The HTML content will be stored in the database.

Can someone point me in the right direction for best practices on how to accomplish this?


Passing Linq Statement between master and content page


I usually work with windows forms, and am just starting to work with ASP.Net, so appologies if this is a dumb question!

I have a master page which has a search button on it. The results of this are built up using a Linq statement and if there are any results, I want to display the results in a contents page.

On the masterpage, I have the following code:

Private _res

    Public Overridable ReadOnly Property SearchRes()
            Return _res
        End Get
    End Property

 Private Sub DoSearch()
   'some code to get a linq result

    If res.Any Then
            _res = res
            Server.Transfer("SearchResults.aspx", True)
            'no results
            LabelNoRes.Visible = True
        End If
 End Sub

On the SearchResults.aspx page I have this code.

Dim m As pxSite = CType(Page.Master, MasterPage)
        If m.SearchRes IsNot Nothing Then
            Label1.Text = "Results found = " & m.SearchRes.Count
        End If

m.searchRes is always nothing. 

What am I doing wrong here?


Selected to change the background color of the page



As this site, http://www.borfin.com.tr/genel/Default.aspx, How can I change the background color selected pages.

Request.PathInfo losing Master Page content and CSS link


Hi All-


I'm using Request.PathInfo to response.redirect as user to a different page ( based on the content after .aspx ).  It redirect just fine however, once redirected, the page loses all content from the master page and the CSS link.  I've searched and can't find an answer. 

Does anyone have a solution for this?

Change label text on master page from the content page.

Hello. Can I access the objects (for example change the label text) on the master page, from its contents page code? If yes, how can I approach that? Thank you Artashes

bind drop down list in content page from value from master page

Hi all, I have applied nested master page to some page. Now i want to bind drop downlist from value selected in dropdown list in master page of master applied to that page. the hierarchy of pages is  mypage.aspx -> main.aspx -> inner.master I want bind dropdown list in  mypage.aspx from  from value selected in dropdown list in  inner.master Please help me. 

image is showing in sql image viewer,but in aspx page it is not getting

dears , in sql 2005 table i created an image columnin that image colum i inserted an image in hex format. data like as follows.0xFFD8FFE00104A4649460110010100FFDB0430C88A88CAAACCCE101C121010101022181A141C28222A28262226262C303E342C2E3A2E2626364A363A40424646462A344C524C44503E444642FFDB0431CCC10E1020121220422C262C4242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242FFC401F001511111100000000123456789ABFFC40B5100213324355440017D12304115122131416135161722711432813FA182342B1C11552D1F0243362723F9A161718191AD25262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3FA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC401F103111111111000000123456789ABFFC40B5110212443475440127701231145213161241517617113223281814423FA1B1C19233352F0156272D1A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A7374D75767778797A3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3FA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9FAFFC0011807803F3121021113111FFDD0402FFDA0C31021131103F0A6B1D43F3A42B0E03FED3F3F63FFD0685A5DB5216176D1B69058FFD15DB46DA80DB49B6811FFFD24D3F3F2A434AD46C9408FFFD38D52A511D21D3F8E97CBA763FFD43F651B2A4A176D1B698FFD53F6D1B6A61B28D94058FFD63F65

master pages - how to access content page from master page?

Hello,I have a master page setup that is used throughout my site that is basically a header with a menu. I recently added a textbox and a button to this master page which is to be a quick search box that is available anywhere in the site. When a user enters text into the search box and hits the button, I need to load the actual content page which is used to search and show search results (which also uses this same master page), and have the text entered available so the search can be triggered automatically. Again, this search text box and button is now in my master page so it could be  triggered from anywhere in the app... it serves as a convenient way to do a basic search from anywhere in my app, without having to first navigate to the actual 'search page' that already exists.  You can also navigate to the actual search page, which uses the same master page, where there is many more search options.I'm thrown off by the master page arrangement, which I have not used until this project. What do I do?

Alternative coloring and Image background color

Hi        I wanted to simple create a report with alternative background colors. Which I could achieve easily. Now I have a column in this report which is supposed to display image. Based on value from the data field a red or green or blue icon is displayed in this column based on expression. Which is also working fine. Now the problem is after I place an image in this details column (with or without expression).  the alternative row coloring stopped working. its always white. I even tried creating a colored background image and still its not helping. Can some one help me out please? If the question is still not clear, please let me know.... for Screenshot please refer http://binabdu-fayaz.blogspot.com/2010/09/alternative-coloring-and-image.html Thanks a lot. Fayaz  

Accessing master page from content page? Raising Event?

Here is my situation:I have a user control that has a menu in it.  This user control sits on my master page.  It is my main navigation menu for my application.I am having an issue where, on one of my pages, users seem to be leaving the page before committing all changes to the database, which results in a loss of data.So what I want to accomplish is - if the user is leaving this page and the data has not been saved yet, I want to prompt the user and say something like "The information is not yet saved, are you sure you want to leave this page" in a modal popup.So my approach is this:In my menu user control, create an event handler called MenuClicked that is raised when the menu web control's (in the user control) MenuItemClicked is raised, I raise my custom MenuClicked event.Then on my master page, I can catch this event in NavMenu_MenuClicked.My problem is - I need to catch this event in my content page, not the master?Am I approaching this correctly?Thanks in advancesb

Problems with Master Page and content window

I have a master page whose primary function is to allow a user to search for a Credit Union.  They can either search by ID # or search by name.  With processing this page it will set session variables which in turn I would hope would be passed along to the content window. Within the content window I am displaying the information that will be needed on that particutlar page, if no record is found then it will allow them to add.  I also need it to clear the fields in the content window if they go from one record with data to one without.  Now if a user types in the ID#, then it doesn't seem to have any problems populating the content window.  The problem comes when they try and search by name.  If more then one record is returned then it will populate a listbox.  Which then I would like a user to select the name they are searching for and then populate the search boxes as well as process the content window. The problem I seem to be facing is the Page Load on the content window.  Session variables don't seem to be set in time for the content window to have the variable available to it. Hopefully you can help me out.Masterpage.master.vb Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'ResetValues() Me._txtCUName.Attributes.Add("onchange", "if(document

Validation summary not showing in master page

Hi, I am using User controls in my web page. I have validation controls in my user control and the validation summary control is placed in the master page. Problem is I am not getting the errors displayed when I am running my application. Any help is appreciated.   Thanks.

Accessing master page controls from content page formview



I have a master page with a textbox that I want to use for a search, and display the results on the content page.

I've dragged in the datasource to the content page, and configured the formview to use that datasource... almost.

The issue I'm having is that on the last step of the configure datasource wizard where you select the parameters, I want to select the master page textbox control for the search parameter... but of course it's not available in the list. The list only allows me to choose controls from the content page.

How do I set this master page search box as the parameter for my datasource?

Any ideas would be much appreciated!



help me on master pages & content place holders.


Hello sir, i am new to this forum, so please excuse me on my mistakes. I have a master page with asp TextBox and a Button also with 2 ContentPlaceHolders(ContentPlaceHolders1 & ContentPlaceHolders2). The project contains 2 WebForms Default.aspx & Search.asp. The purpose is to use the button click event to search records & place the results in the content page Search.aspx in ContentPlaceHolders1. The search is working fine but the problem is that the results get placed on the top(instead in the ContentPlaceHolders1) with the master page controls going down on the Search.aspx page. Please help me on this. I tried a lots of things like changing search page events to Page_LoadComplete etc etc but nothing worked.

My Default.aspx.vb code is as:

    Public Sub mySearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mySearch.Click

        Response.Redirect("Search.aspx?nameA=" + Keyword.Text)

    End Sub

End Class

My Search.aspx page is:

Manage Content on a Master Page from a Central Location?


Phew long title! But what is the best way to manage and render content on a master page that you want to show up on ever single site/subsite? For example I have a bunch of site collections with footer links. Each site collection however will have its own sets of links but we don't want them hard coded into the master page - so we don't have to manage 80 different master pages.

Right now I am using an XML file in the style library which is called from the master page. This works alright, but if that file gets deleted or something then the whole site breaks because it can't find that file. Additionally, the XML file is finicky with some of the stuff you put in it.

Any better suggestions?

Showing Ribbon on master page: The page you selected contains a list that does not exist.


I am performing a content database upgrade of a SharePoint 2007 site collection to SharePoint 2010. I used the mount-SPContentDatabase with the –UpdateUserExperience switch. I set the site to use the v4.master page as the master page. If the ribbon is not displayed on the page, the page renders. However when I show the ribbon I get the following error:


Server Error in '/' Application.


List does not exist.

The page you selected contains a list that does not exist. It may have been deleted by another user.<nativehr>0x81020026</nativehr><nativestack></nativestack>

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend