asp.net div Images not displayed in few Client machine - asp.net

I have developed a Web Application where i have these following pages and their corresponding Problematic tags.
Login Page :
<div id="maindiv" runat="server" style="background-image: inherit; height: 997px;">
<img id="Img1" runat="server" src="images/Login1.jpg"
style="width: 100%; height: 978px" alt="" />
Master Page:
<div id="Div1" style="position: absolute">
<img src="images/Circle_300.jpg" style="height: 132px; width: 159px" />
</div>
and
<div id="logo">
<asp:Panel ID="ImgagePanel" runat="server"
BackImageUrl="~/images/Logo_2.jpg" Height="100%"
Width="100%" > </asp:Panel>
</div>
I have all those Images under "images" directory in the application. the images are getting displayed well and good in all our office environment systems and outside client machines too. but the same not getting displayed in my real Client office systems..but the div tag with "Div1" alone is getting displayed in their systems.but not other images. Don't know where im going wrong. Please help me out.
One More Info: When I right click and save on the place where image is to be displayed i get "blockedpage.gif" instead of the real image in the site whereas I can save the images from my machine. is it something with their security settings ?

Related

iframe with aspx page makes page stop rendering

I have an iFrame inside my index page. This iFrame contains an aspx page with a form inside it, with runat=server.
For some weird reason, anything I add after the iFrame is not being rendered to the page.
I tried adding text, a div, nothing is being added after when I run the page.
Code:
<body>
<asp:Panel ID="Panel1" runat="server" Height="80px">
<iframe name="LogoFrame" id="LogoFrame" src="asp/Logo.aspx"
scrolling="no"
style="border-style: hidden; padding: 0px; margin: 00px; width: 100%; height: 100%"
width="100%"/>
</asp:Panel>
<form id="MainMenu" method="post" runat="server">
<asp:Panel ID="Panel2" runat="server" Height="38px">
<table class="tableMenu" id="MainTable" style="BACKGROUND-COLOR: #e2eded" cellSpacing="0"
cellPadding="0" width="100%" border="0">
<tr class="trMenu2" vAlign="middle">
// Some other things below, including the closing of Panel2 and MainMenu form
When I run and inspect the page...
If I remove the iFrame, the rest of the page renders properly.
What is up with that?
I suspect it's because the iframe tag is self-closing and iframes should not be self-closing. If you replace ' />' with '></iframe>', I think that should resolve the problem.
Seems like the iframe is out of the form tag. But you put the iframe inside a Panel, which is an asp.net tool. You can try Removing the panel, or moving the code inside the form tags.

Master Page Contents aren't Same in All pages

I use Master Page in my Project.But Master Page contents are not same in all pages.In Home.aspx page it's margin is 0px and in other page isn't. Texts are Bold and Big Size in one page and Small in another Page. Why this occur?
My Master.master page Code :
<body style="margin:0px; text-align: left;">
<form id="form1" runat="server">
<div>
<div class="auto-style1" style="background-color: #3399FF; height: 42px;">
<h2>
<asp:Label ID="homeLabel" runat="server" Text="Home"></asp:Label>
</asp:Label>
<asp:Label ID="file_sharedLabel" runat="server" Text="Files Shared"></asp:Label>
<asp:Label ID="blogLabel" runat="server" Text="Blogs"></asp:Label>
</h2>
</div>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
And Two picture of Home.aspx and Members.aspx are
What happens I don't Catch .
Again, it is hard to tell what is going on without the actual HTML from your child pages. However, judging from the picture, you are probably looking for a margin value on a an element between your <asp:ContentPlaceHolder> tags.
It looks like your second page is using a <table> of some sort.
Make sure your table has:
style="margin-top: 0px;"
Or
<table class="noTopMargin"> ...
<style>
.noTopMargin { margin-top: 0px; }
</style>
As for the font-size and font-weight being messed up, it is possible that your second page has a <style> declaration somewhere which is screwing it all up. Also make sure that your browser zoom is the same between both pages.

asp:TextBox rendering disabled in FireFox 23.0.1

I had a working asp:TextBox control in an old webforms app that broke when FireFox upgraded from version 22.0 to 23.0.1 tonight. The code looks like:
<asp:TextBox ID="txtChainDescription" TextMode="MultiLine" Rows="5" Width="350px" runat="server" />
That's all. This renders in Chrome as
<div class="cleditorMain" style="width: 500px; height: 150px;">
<div class="cleditorToolbar" style="height: 27px;">
<div class="cleditorGroup">
<div class="cleditorButton" title="Bold"></div>v class="cleditorGroup">
... etc., but renders in FireFox as
<div class="cleditorMain" style="width: 500px; height: 150px;">
<div class="cleditorToolbar">
<div class="cleditorGroup">
<div class="cleditorButton cleditorDisabled" title="Bold" disabled="disabled" style="background-color: transparent;"></div>
... etc. So the difference is that the editor button is disabled, and the textarea that needs to be edited seems completely disabled as well. So a couple questions:
1) Why is this happening?
2) What changed in Firefox from version 22.0 to 23.0.1 that would be responsible for this?
Without testing it I can't say for sure but my money would be on browser definition files, eg please see
http://www.hanselman.com/blog/BugAndFixASPNETFailsToDetectIE10CausingDoPostBackIsUndefinedJavaScriptErrorOrMaintainFF5ScrollbarPosition.aspx
There's probably an issue with the definition files not recognizing v23 in FF.

Is it possible to put HTML in an ASP.NET .ashx file?

I am wondering it is possible to place html/javascript/etc in a .ashx file. I tried doing this, and I am getting the error "A namespace cannot directly contain members such as fields or methods"
The reason I want to do this, is because I am trying to implement photoswipe (http://www.photoswipe.com). Photoswipe needs some special CSS, which I think I am losing when I go into the .ashx file. I want to be able to add some HTML to it to point at the CSS file that I think I am losing.
Edit: here is an example of what my markup looks like. When I click on the href, I am brought to a new page with ".ashx?QueryStringParms=blah" in the browser. Here is where I believe I am losing my CSS.
<div style="text-align:center;" class="gallery-page" data-role="content">
<ul id="gallery" class="gallery" style="max-height: 75%;">
<li style="height: 120px; width: 93px; padding-bottom: 2px;"><img src="../Utilities/ImageHandler.ashx?QueryStringParms=blah" /></li></ul></div>
Thanks
Your code should look like this :
<div style="text-align:center;" class="gallery-page" data-role="content">
<ul id="gallery" class="gallery" style="max-height: 75%;">
<li style="height: 120px; width: 93px; padding-bottom: 2px;"><img src="../Utilities/ImageHandler.ashx?QueryStringParms=blah" /></li></ul></div>
and then, in your bigimage.aspx file, you'd have some HTML (the CSS and javascript you may need) + an image tag :
<img src="../Utilities/ImageHandler.ashx?QueryStringParms=blah" />
I presume the querystring params indicate which image you want and the needed size

CSS window resizing problems in IE6

Although almost nobody supports IE6 anymore, I've been given the task to design an IE6-compatible webpage.
Here's the code:
<body style="background-color: #ccccdd;">
<form id="form1" runat="server"
style="margin: 0px 80px 0px 80px;
background-color: #f1f1f1;">
<div id="divPage" style="width: 100%">
<div id="divSelectOption" runat="server">
<div id="divInstruct" style="float: left;
position: relative;
display: inline-block;">
Select your gender:
</div>
<div style="margin-left: 10px;
display: inline-block;">
<asp:RadioButton ID="rbFemale" runat="server" style="display: block;"
Text="Female" GroupName="grpGender" Checked="true" />
<asp:RadioButton ID="rbMale" runat="server" style="display: block;"
Text="Male" GroupName="grpGender" />
</div>
</div>
</div>
</form>
</body>
Here's the problem:
If an IE6 browser opens the page (whether maximized or restored (meaning when the window only covers part of the screen)), all is displayed normally.
However, if the page is loaded when the browser is maximized, and then the user minimizes it, divInstruct gets pushed all the way to the right side of the window.
I apologize in advance if you feel that supporting IE6 is a waste of time, but these are the clients' demands.
I'd appreciate any help.
UPDATE: When I remove width: 100% from divPage's style attribute, the above problem is gone; however, this causes the margin attribute of form1 to stop working. (Only in IE6!)
I'd suggest checking your external css files carefully, if an invalid selector is passed into IE6, it ignores everything after it.
Also, ensure you're applying a css reset so you're starting from the same css state in each browser.
This doesn't feel like a typical IE6 problem to me. It feels like a coding problem that IE6 isn't able to resolve with the grace of its younger browser cousins.

Resources