I have a webusercontrol with several controls on it, including an image
control.
I've coded a public sub "Display" which puts an image in the Image control.
The problem is, when I call Display, the Image control is nothing. Why?
In fact, when I get to this point, all the controls (lblPrice, etc.) are
nothing.. Why?
Here's some code:
Public Sub Display()
'refresh controls, show picture and text
Try
DisplayImageBytes(m_Image, Image1, "Package1")
lblContents.Text = m_Contents
lblPrice.Text = m_Price.ToString("{0:c}")
Catch ex As Exception
End Try
End Sub
When this executes (it gets called from the parent form which contains the
usercontrol) it gives me an error because it says Image1 is nothing.
What's going on?
Thanks!
---Selden McCabe 1 1275
The Image control must point to a URL.
It doesn't have to point to a JPG or GIF, it can point to an ASPX.
Within THAT ASPX is there you should generate the image.
Here's more info: http://SteveOrr.net/articles/EasyUploads.aspx http://www.aspnetpro.com/features/20...200412so_f.asp
--
I hope this helps,
Steve C. Orr, MCSD, MVP http://SteveOrr.net
"Selden McCabe" <se*****@msn.com> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl... I have a webusercontrol with several controls on it, including an image control.
I've coded a public sub "Display" which puts an image in the Image control.
The problem is, when I call Display, the Image control is nothing. Why? In fact, when I get to this point, all the controls (lblPrice, etc.) are nothing.. Why?
Here's some code:
Public Sub Display() 'refresh controls, show picture and text Try DisplayImageBytes(m_Image, Image1, "Package1") lblContents.Text = m_Contents lblPrice.Text = m_Price.ToString("{0:c}") Catch ex As Exception End Try End Sub
When this executes (it gets called from the parent form which contains the usercontrol) it gives me an error because it says Image1 is nothing.
What's going on?
Thanks! ---Selden McCabe
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mike Levin |
last post by:
Hello Group,
I'm using VisualStudio.NET and put a DataGrid into a WebUserControl (an ascx
file). For the DataGrid element, I have set AllowSorting="True" and
OnSortCommand="Grid_Sort".
|
by: DichkoSoft |
last post by:
Hi
I create WebUserControl and very confused when use control
For Example:
*****************************
*wuc.ascx
*****************************
<script id=clientEventHandlersJS...
|
by: Christian H |
last post by:
Hello,
I've just created a WebUserControl that consists of a few other controls
such as DropDownList, TextBox and Button.
Based on the information entered in the DropDownlist, and TextBox, the...
|
by: Oren |
last post by:
Hello everyone...
I have a simple WebUserControl with Button and TextBox on it. Webform1.aspx
contains this WebUserControl.
How can I create my own C'tor for this WebUserControl - I mean when I...
|
by: Oren |
last post by:
Hi everyone,
I have WebUserControl on a Webform.
How can I sent dynamically to the WebUserControl from a Function/Property on
the Webform ?
<uc:myuc id="myid1" CurrentPage=<%#GetText()%>...
|
by: Giovanni |
last post by:
Dear Friends,
I have a decision to make and hope to get some insight: I have built
several WebUserControls one of which is a WebUserControl that queries an SQL
server database, retrieves a...
|
by: Terry Olsen |
last post by:
In an effort to create a QueryBuilder for a web page, I've created a
WebUserControl. It can be seen here:
http://boycot.no-ip.com/images/querybuilder.jpg
I load one control initially in the...
|
by: Klaus Jensen |
last post by:
Hi
In a repeater-control, in the <SeparatorTemplatei have placed a
webusercontrol, I have made. That works great-
However, I want to know be able to only display this WebUserControl a
certain...
|
by: deeparengan |
last post by:
hi
in asp.net i have a webusercontrol that has three dropdownlist.In the first dropdownlist i loaded the data at design time and in second dropdownlist i load the some data at run time according to...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| | |