?
Solved

ASP.NET issue displaying image button

Posted on 2012-08-24
12
Medium Priority
?
636 Views
Last Modified: 2012-08-29
I have a web page that dynamically creates an image button and displays it on my web page.  

When running the web app locally and on the prod servers (e.g. myserver.myweb.com) the image shows up with no problem.

When running the app via externally (e.g. www.mywebsite.com) the image dose not display.  I just get the red x.  It is only one button on one page that has this issue.

Any ideas?
0
Comment
Question by:CipherIS
  • 6
  • 3
  • 2
  • +1
12 Comments
 
LVL 14

Expert Comment

by:Vel Eous
ID: 38329396
Are you certain the pathing is correct?
0
 
LVL 1

Author Comment

by:CipherIS
ID: 38329447
yes.  The button displays when I call it by server.  It does not display when using the www.mywebsite.com.
0
 
LVL 1

Expert Comment

by:mr-kenny
ID: 38329480
can you show the code?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:CipherIS
ID: 38329488
Here is the code for the button.

<asp:ImageButton runat="server" id="btnBackToEvent" CausesValidation="false" 
ImageURL="~/img/Button.aspx?W=350&T=<&nbsp;Back to event&S=75" 
onclick="btnBackToEvent_Click" Visible="false"></asp:ImageButton><br />

Open in new window

0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 38329549
...and "button.aspx" is some sort of retrieval page?  Do all the other images on the page use that to display?
0
 
LVL 1

Expert Comment

by:mr-kenny
ID: 38329568
What is this site Button.aspx with these paramters (W=, T=, S=) doing?
0
 
LVL 1

Author Comment

by:CipherIS
ID: 38329661
W = Width
T = Text
S = Scale

Its dynamically creating the button.  Every page uses the button.aspx.  Only having issues with 1 button.

Some of the code in the Button.aspx.cs page

Bitmap canvas = new Bitmap(btnWidth, btnHeight);
Graphics d = Graphics.FromImage(canvas);
Font btnFont = new Font("Arial", 14 * btnScaleF, FontStyle.Bold);

canvas = new Bitmap(btnWidth, btnHeight);
d = Graphics.FromImage(canvas);

d.DrawImage(btnF, 0, 0, btnWidth, btnHeight);
d.DrawImage(btnL, 0, 0, CapWidth, btnHeight);
d.DrawImage(btnR, btnWidth - (CapWidth), 0, CapWidth, btnHeight);

Open in new window

0
 
LVL 1

Expert Comment

by:mr-kenny
ID: 38329736
what's this T=< brace doing here ?
0
 
LVL 1

Author Comment

by:CipherIS
ID: 38329757
It is just printing the "<" char.  It is part of the text.
0
 
LVL 1

Accepted Solution

by:
CipherIS earned 0 total points
ID: 38329797
fixed it.  deleted the "nbsp;"
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 38329962
Is there a snowball's chance you'd be willing to share that button.aspx page?  It sounds like something I could use.

If it's proprietary, I understand.
0
 
LVL 1

Author Closing Comment

by:CipherIS
ID: 38344690
figured it out
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month16 days, 3 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question