Showing posts with label couple. Show all posts
Showing posts with label couple. Show all posts

Wednesday, March 28, 2012

strange compilation error I have never seen before

Hi David,
A couple of things to try...
Make sure the ASP.NET mappings are still correctly configured. There's a
procedure here:
http://support.microsoft.com/defaul...&product=aspnet
Also, try deleting the contents of the
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files .
Let us know what works?
Ken
"David" <spammersgohome@dotnet.itags.org.spammersgohome.com> wrote in message
news:e5aGc.20071$ju5.4042@dotnet.itags.org.twister.socal.rr.com...
>I was experimenting with generating a Word file using ASP.NET, and lauching
> the web app did not cause any problems.
> Then out of the blue, this is happening to every asp.net app that I
> attempt
> to launch on my machine. When I click on the "Show Complete Compilation
> Source". this is what shows. Since it is happening to every ASP.NET app,
> I
> think my machine has been seriously screwed up. Has anyone seen this?
> Compiler Error Message: The compiler failed with error code 128.
> Show Complete Compilation Source:
> Line 1:
> //---
--
> --
> Line 2: // <autogenerated>
> Line 3: // This code was generated by a tool.
> Line 4: // Runtime Version: 1.1.4322.573
> Line 5: //
> Line 6: // Changes to this file may cause incorrect behavior and
> will
> be lost if
> Line 7: // the code is regenerated.
> Line 8: // </autogenerated>
> Line 9:
> //---
--
> --
> Line 10:
> Line 11: namespace ASP {
> Line 12: using System;
> Line 13: using System.Collections;
> Line 14: using System.Collections.Specialized;
> Line 15: using System.Configuration;
> Line 16: using System.Text;
> Line 17: using System.Text.RegularExpressions;
> Line 18: using System.Web;
> Line 19: using System.Web.Caching;
> Line 20: using System.Web.SessionState;
> Line 21: using System.Web.Security;
> Line 22: using System.Web.UI;
> Line 23: using System.Web.UI.WebControls;
> Line 24: using System.Web.UI.HtmlControls;
> Line 25:
> Line 26:
> Line 27:
> [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
> Line 28: public class Global_asax : ApplicantApp.Global {
> Line 29:
> Line 30: private static bool __initialized = false;
> Line 31:
> Line 32: public Global_asax() {
> Line 33: if ((ASP.Global_asax.__initialized == false)) {
> Line 34: ASP.Global_asax.__initialized = true;
> Line 35: }
> Line 36: }
> Line 37: }
> Line 38: }
> Line 39:
>Rebooting the computer solved the problem.

> Hi David,
> A couple of things to try...
> Make sure the ASP.NET mappings are still correctly configured. There's a
> procedure here:
> http://support.microsoft.com/defaul...&product=aspnet
> Also, try deleting the contents of the
> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files .
> Let us know what works?
> Ken
>

Thursday, March 22, 2012

Strange HTML button postback

I have a webform with lots of <asp:...controls but I need couple of buttons
that doesn't cause an automatic postback. I use javascript to handle these
buttons. I tried two approaches with different results:

<IMG onmouseup="src='Bitmaps/Controls/measure_over.bmp';"
onmousedown="src='Bitmaps/Controls/measure_pressed.bmp';"
id="measure" onmouseover="src='Bitmaps/Controls/measure_over.bmp';"
style="LEFT: 170px; WIDTH: 24px; POSITION: absolute; TOP: 2px; HEIGHT: 25px"
onclick="buttonClicked(this.id);"
onmouseout="src='Bitmaps/Controls/measure_btn.bmp';"
alt="" src="http://pics.10026.com/?src=Bitmaps/Controls/measure_btn.bmp"
This is working the way I want to, but I can't disable it as I can with a
button. I then replace the IMG with:

INPUT Type="image"

and it makes a postback every time I click on it. Why? A HTML control
should't do that, right? The script itself (buttonClicked) just fills a
hidden field.

/MiroFrom the MSDN Library about the <input typ="image" tag:

------------------------
INPUT type=image Element | input type=image Object
Creates an image control that, when clicked, causes the form to be
immediately submitted.
------------------------

Maybe add "onclick='return false;'" to the tag.

-Jason Kendall
JasonKendall@.hotmail.com

On Tue, 1 Feb 2005 05:55:13 -0800, "Miro"
<Miro@.discussions.microsoft.com> wrote:

>I have a webform with lots of <asp:...controls but I need couple of buttons
>that doesn't cause an automatic postback. I use javascript to handle these
>buttons. I tried two approaches with different results:
><IMG onmouseup="src='Bitmaps/Controls/measure_over.bmp';"
>onmousedown="src='Bitmaps/Controls/measure_pressed.bmp';"
>id="measure" onmouseover="src='Bitmaps/Controls/measure_over.bmp';"
>style="LEFT: 170px; WIDTH: 24px; POSITION: absolute; TOP: 2px; HEIGHT: 25px"
>onclick="buttonClicked(this.id);"
>onmouseout="src='Bitmaps/Controls/measure_btn.bmp';"
>alt="" src="http://pics.10026.com/?src=Bitmaps/Controls/measure_btn.bmp">
>This is working the way I want to, but I can't disable it as I can with a
>button. I then replace the IMG with:
>INPUT Type="image"
>and it makes a postback every time I click on it. Why? A HTML control
>should't do that, right? The script itself (buttonClicked) just fills a
>hidden field.
>/Miro

Strange HTML button postback

I have a webform with lots of <asp:...controls but I need couple of buttons
that doesn't cause an automatic postback. I use javascript to handle these
buttons. I tried two approaches with different results:
<IMG onmouseup="src='Bitmaps/Controls/measure_over.bmp';"
onmousedown="src='Bitmaps/Controls/measure_pressed.bmp';"
id="measure" onmouseover="src='Bitmaps/Controls/measure_over.bmp';"
style="LEFT: 170px; WIDTH: 24px; POSITION: absolute; TOP: 2px; HEIGHT: 25px"
onclick="buttonClicked(this.id);"
onmouseout="src='Bitmaps/Controls/measure_btn.bmp';"
alt="" src="http://pics.10026.com/?src=Bitmaps/Controls/measure_btn.bmp">
This is working the way I want to, but I can't disable it as I can with a
button. I then replace the IMG with:
INPUT Type="image"
and it makes a postback every time I click on it. Why? A HTML control
should't do that, right? The script itself (buttonClicked) just fills a
hidden field.
/MiroFrom the MSDN Library about the <input typ="image" tag:
----
--
INPUT type=image Element | input type=image Object
Creates an image control that, when clicked, causes the form to be
immediately submitted.
----
--
Maybe add "onclick='return false;'" to the tag.
-Jason Kendall
JasonKendall@.hotmail.com
On Tue, 1 Feb 2005 05:55:13 -0800, "Miro"
<Miro@.discussions.microsoft.com> wrote:

>I have a webform with lots of <asp:...controls but I need couple of buttons
>that doesn't cause an automatic postback. I use javascript to handle these
>buttons. I tried two approaches with different results:
><IMG onmouseup="src='Bitmaps/Controls/measure_over.bmp';"
>onmousedown="src='Bitmaps/Controls/measure_pressed.bmp';"
>id="measure" onmouseover="src='Bitmaps/Controls/measure_over.bmp';"
>style="LEFT: 170px; WIDTH: 24px; POSITION: absolute; TOP: 2px; HEIGHT: 25px
"
>onclick="buttonClicked(this.id);"
>onmouseout="src='Bitmaps/Controls/measure_btn.bmp';"
>alt="" src="http://pics.10026.com/?src=Bitmaps/Controls/measure_btn.bmp">
>This is working the way I want to, but I can't disable it as I can with a
>button. I then replace the IMG with:
>INPUT Type="image"
>and it makes a postback every time I click on it. Why? A HTML control
>should't do that, right? The script itself (buttonClicked) just fills a
>hidden field.
>/Miro

Strange Image Problem

I have created a master page and inserted a couple images. When I look at them in design view the appear as a box with an x in it which is not correct. When I view the page in the browser it displays the image. What is the problem?

Here is the master page code:

<%@dotnet.itags.org. Master Language="VB" %
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<script runat="server"
</script
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<center>
<img src="http://pics.10026.com/?src=Images/delilogo.jpg" runat="server"/><br /> <img src="http://pics.10026.com/?src=Images/topmenu.jpg" runat="server"/>
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
</asp:contentplaceholder></center>
</div>
</form>
</body>
</html>

The designer in VS is no good. I would rely on your source and forget the designer most of the time. But if you really want the images to appear in the designer, try draging and dropping your images from VS Solution Explorer onto the designer surface.

Hope this helps.


Hinzamorski ,

try the following:

<asp:ImageID="Image1"runat="server"ImageUrl="~/im.JPG"/>


Hi nzamorski,

I'm sure this should work as well as the asp:Image control.

<img src="http://pics.10026.com/?src=Images/delilogo.jpg" runat="server"/>

First, where is your website project located? Is it IIS project or File System project? Please double check the folder structure if the relative path to Images/delilogo.jpg is right. When the website is located in IIS server, the relatvie path to the image in a virtual directory or a web application might be different.

I agree with the guys above, you can drag and drop the image if you are not certain of the path to the image. But first make sure the Images folder is in the root folder of the project. Thus you will find the folder is appearing in the Solution Explorer window of Visual Studio. Pick up the image and drag & drop it into the Design View will be simpler.

Hope it helps.