Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't see the image and textbox 1

Status
Not open for further replies.

broadstock

Programmer
Feb 23, 2004
5
US
I am new in ASP.Net. Even I followed all the steps from the book, the web form didn't run right. I can see my image and textbox in the design view, but when I run the program, the image did not show and the value of textbox assigned by the vb codes did not show either. My instructor can't help me, can anyone help?
 
Could you write the code that generates the image and the textbox please? And the error message if exists as well.
 
Here is my image code
<asp:Image id=Image1 style="Z-INDEX: 101; LEFT: 24px; POSITION: absolute; TOP: 40px" runat="server" Width="232px" Height="136px" ImageUrl="clearlogo.jpg"></asp:Image>

Textbox code is
<asp:TextBox id=txtOrderDate style="Z-INDEX: 103; LEFT: 288px; POSITION: absolute; TOP: 136px" runat="server" Height="32px" Width="208px"></asp:TextBox>

VB code
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
txtOrderDate.Text = DateString
End Sub

Thank you for checking for me.
 
All seems good, maybe another person can help you.
 
After I could not figure out the problem. I uninstalled both IIS and Va.net, and reinstalled them back. I didn't get any error message after I installed them. But reinstall them did not help. Any suggestion?

Thanks for helping.
 
make sure that the image is in the same directory as your page.
Make sure Datestring has a value in it

That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Yes, the image is in the same directory as my page. I can see the image and textbox in the VS.net design view, but I can't see it when I run the project.

DateString always returns the system date as "MM-dd-yyyy". So it should be ok.

The textbox did not show even I changed the code to
txtOrderDate.Text = 3

However, the textbox did show the value which set at design time, but not dynamic control.

Any idea?
 
Did you register the ASP.NET service? Test the asp.net service. Create a page with asp.net controls on it. Ex. 1 asp.net text box and label. Then open that page using the browser. If the page does not show correctly then your asp.net service is not registered. You need to run the aspnet_regiis.exe program. This program is usually located at the following location. C:\WINNT\Microsoft.NET\Framework\v1.1.4322

I hope that this helps.
Klaz
 
Thank you so much, Klaz

It works!! I installed .net last year and IIS this month. When my form did not run correctly, I found out it might cause by the incorrect installation order, so I uninstalled both and reinstalled them in the right order. But its still not working, I did not realize that I need to register asp.net service. After run aspnet_regiis.exe, now it runs fine. Thank you so much.

Woop, I just find out that students are not allowed to post in the forums. Sorry!! I really appreciated all your time and help. :-D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top