CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 10/8/2004 5:47:46 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 86 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
EK1
Asp.Net User
Using an embedded resource for ImageUrl10/8/2004 5:47:46 PM

0/0

Does anyone know how set the ImageUrl of an image button using an embedded resource? The only code I can find is

Public Shared Function ConstructImageURL(ByVal image As String) As String
Dim asm As [Assembly] = [Assembly].GetExecutingAssembly()
Return String.Concat(".mfr?assem=", HttpUtility.UrlEncode(asm.FullName.ToString()), "&image=", HttpUtility.UrlEncode(image))
End Function

This doesn't work for me.

Thanks

Erik
joteke
Asp.Net User
Re: Using an embedded resource for ImageUrl10/8/2004 7:14:23 PM

0/0

It would need a custom HTTP Handler to serve the image from resource file (that's what .mfr extension in your example code refers to, a HTTP Handler mapped for .mfr file extension). Then the ImageURL is put to refer to the URL of the handler with given parameter.

Basically in the handler you can read the resource using Assembly.GetManifestResourceStream and then write it(it's bytes) to the response.


Thanks,

Teemu Keiski
Finland, EU
EK1
Asp.Net User
Re: Using an embedded resource for ImageUrl10/9/2004 11:14:20 PM

0/0

Ok thanks a lot.
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Pro ASP.NET 2.0 in C# 2005: Create Next-generation Web Applications with the Latest Version of Microsoft's Revolutionary Technology Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1426, Published: 2006
High Performance Web Sites: Essential Knowledge for Frontend Engineers Authors: Steve Souders, Pages: 146, Published: 2007
Pro CSS and HTML Design Patterns Authors: Michael Bowers, Pages: 494, Published: 2007
A First Look at ASP.NET V. 2.0 Authors: Alex Homer, Dave Sussman, Rob Howard, Pages: 528, Published: 2004
ASP. NET V. 2. 0-the Beta Version: The Beta Version Authors: Alex Homer, Dave Sussman, Rob Howard, Pages: 620, Published: 2004
Advanced Java Game Programming Authors: David Wallace Croft, Pages: 558, Published: 2004
Web Standards Programmer's Reference: HTML, CSS, JavaScript, Perl, Python, and PHP Authors: Steven M. Schafer, Pages: 812, Published: 2005
Flickr Mashups Authors: David Wilkinson, Pages: 419, Published: 2007
Professional ASP.NET 2.0 Server Control and Component Development Authors: Shahram Khosravi, Pages: 1186, Published: 2006

Web:
Embedding Resources in ASP.NET 2.0 Assemblies: ASP Alliance NET 1.1 we have recently started using an HttpModule and compiled resource ..... Build Action on image is set to "Embedded Resource". ImageURL is set in the ...
Working with Web Resources in ASP.NET 2.0 This script file that is named MyScript.js is also an embedded resource in the same COM control. And notice that I am using the WebResource method to refer ...
Images as embedded resources : imageurl so if there's an image, logo.gif, stored as an embedded resource and I want to .... the dynamic image generation: We are bound to access it using the URL. ...
Using the WebResource.axd Handler with Embedded ASP.NET Resources In place of the image URL we use the special syntax - WebResource( FullNameOfResource). ... I've embedded .js files in the assembly using the resource file. ...
webcontrol embedded image url in CSS - ASP.NET Forums I have created a grid webcontrol, simple and general using ... CSS is also flagged as embedded resource and the CSS property is like below: ...
Nikhil Kothari's Weblog : Whats with System.Web.UI ... Is there any method of using the performSubstitution trick to substitute within a javascript file embedded resource? I have some img references in the js ...
LifeCycle Solutions, LLC - Weblog - How To: Use Web Resources to ... Aug 15, 2006 ... So, to get the embedded resource- be it a script, image, or any other file, .... ImageUrl = Me.Page.ClientScript.GetWebResourceUrl(Me. ...
How to use image resource in asp.net website? - Stack Overflow ... How can I discover the “path” of an embedded resource? ...
Using embedded resources in Web Control Library - ASP.NET Forums I want to set default ImageUrl and CssClass values. I can't use Page. ClientScript. ... Re: Using embedded resources in Web Control Library ...
embedded resource - .NET ASP embedded resource. Get answers to your questions in our .NET ASP forum. ... ImageUrl = Page.ClientScript.GetWebResourceUrl(this. ...




Search This Site:










accessing global variables from compiled code behind

embedding images

just cant win

custom repeater

how? have thmeable url's in custom control.

horrible service by webhost4life

server intellect

hide databinding property

custom web control and child control events

hosting multiple domains/sites on the same account

handling postback - which submit button was clicked?

composite control loses text over postback

invoking static member

announcing limited public beta - xhtml 1.0 strict web controls

accessing control properties from another form

saving object state over postback

dropdownlist in templated control losing items value on postback

how to make a linkbutton placed inside a datagrid fire

using viewstate in a control

datasource problem how to assign the datasource

custom control loaded in pre_render

recommendations for affordable but scalable windows asp .net 2.0 + mysql hosting

viewstate and multiple custom server controls on a page.... will key's be unique?

need up-ti-date info on hosting vendors

listbox datasource property

how to determin a control is in designtime mode or runtime mode?

tracking changes

which cms

url editor

dynamically added controls and events

  Privacy | Contact Us
All Times Are GMT