How to write a file into web project folder from inside a custom web control?

ZedGraph control do something like that. And I want to achieve the same effect.

I am making a custom server control with a background image and the image is generated on-the-fly.

I want to save it somewhere in the referencing project, like a default temperary image folder.

How do I achieve this in my custom server control code?

solve now by saving with Page.Server.MapPath("~/where you want to save")

and retrieve by Page.ResolveUrl("~/where you saved")

0
maxi_ng
3/18/2009 6:22:30 AM
asp.net.custom-server-controls 3498 articles. 0 followers. Follow

2 Replies
738 Views

Similar Articles

[PageSpeed] 3
Get it on Google Play
Get it on Apple App Store

maxi_ng:

solve now by saving with Page.Server.MapPath("~/where you want to save")

and retrieve by Page.ResolveUrl("~/where you saved")

Do you mean you've solved this issue?


Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Allen
3/20/2009 2:03:01 AM

Yes.

0
maxi_ng
3/23/2009 7:38:55 AM
Reply:

Similar Artilces:

Custom Web Control inside another Custom Web Control
Hi I created a custom web control (CusWebNew) that displays some textboxes by adding them to the ControlCollection of the webcontrol. I also created a custom webcontrol (CustWebButton) that inherts from Button control, and overrided the OnClick function. When I use CustWebButton on a regular web form, it seems to function correctly. However, when I added to be part of the ControlCollection of CustWebNew, it stops to work.   Any ideas why? Thanks Hey, What do you mean by stops to work?  Explain what you are trying to do with it and what it doesn't do.Brian"Trust in the...

Is it possible to have a web custom control( not a user control) in the app_code folder of a web project?
Or must it be inside a class library by itself? Do you compile the web site to get the dll then add that to the toolbar? Yes you can find the info here:http://alpascual.com/blog/al/archive/2006/06/19/The-power-of-CompositeControl.-Another-skeleton-class-.aspxCheersAlMy BlogMapStats.NETPlease click on 'Mark as Answer' if this post answered your question! Sorry, I'm not following. What does extending a composite control illustrate about creating a custom web control inside the appcode folder of web project....

Web Custom Control within a Web Custom Control
I was wondering if this can be done and how. I've created a simple custom control that displays a header which is my first custom control. So I'm just a baby when it comes to this.. Within the header I currently have a property for breadcrumbs which is a string. What I would like to do is have the breadcrumb property  be a Link Button List. I did find a custom control of a Link Button List which is exactly what I wanted. My question is how can/do  I include this into my custom control? Can it done? How? Please help? I'm at a lose here.   Susan You should be able to do ...

Custom Server Control Vs Web Parts, Any need for Custom Server Control
Hello I've just posted a similar question on why you need server controls when you can pre-compile usercontrols and redistribute them. http://forums.asp.net/p/1397433/3010100.aspx#3010100 I've seen lots of (usercontrol vs web part) but not much on web part vs custom server control. According to the MSDN site you can put web parts onto a normal asp.net page outside of a web part zone and they behave just like custom server controls. So, if you are creating a bunch of controls for redistribution to customer asp.net sites and/or SharePoint sites why don't you just create Web Par...

Server Web User Control or Web Custom Control
Ok, I made a DataGrid I like, stuck it in a Web Control Lib, and then to my toolbar. Now I want to take my nice little control and add it to a greater control, maybe place some buttons around it etc. I could always inherit from it in a new custom control and dynamically add the buttons, but I thought about using a Web User Control. I thought I could easily create a Web User Control, drop on my grid and the buttons on a form, and expose some properties and events, but once I got into it, I got a feeling that this isn't what a Web User Control is for. When designing a control li...

Reusing custom web control in the same web control
Hello, I'm newbie in web development and of course asp.net. I am actually trying to build my first page and I'd like to know if it is possible to make a custom webcontrol that will contain itself. Let's say I want to draw a folder hierarchy in treeview-like structure. I thought I could make a control that will display a folder and if this folder contains subfolders then for each the control will include itself. Is this even possible? What would you suggest me to do to? Thanks in advance. TomTom Hagen http://thagen.dteam.info If the control can have child controls, then I s...

What is the difference between a Web User Control and a Web Custom Control
Hi ,please could you answer for the following question with example. i know wht they are. but i want to know hw they are existing in web pages with simple example. What is the difference between a Web User Control and a Web Custom Control?  Thanks in AdvanceDilip    Check this out .... hope these might help you out... http://support.microsoft.com/kb/893667http://msdn2.microsoft.com/en-us/library/aa651710(VS.71).aspx itsUrDAY  Hi, See the following URLs: https://msdn2.microsoft.com/en-us/library/fb3w5b53(VS.71).aspx(Introduction to Web User Contr...

Use Web Custom control or Web User control?
Friends,  I have a generic aspx page and its functions which is used in many .NET web application. The generic page contains a HTML Div control, server drop down list, server buttons, server textbox and it have different server and client functions to do its tasks for calling aspx pages in web applications. My problem is I do not know whether I should make that generic page as a web user control (but this is tedious because all other application folders must store frontpage aspx and code behind files of the generic page) or as a web custom control (This seems to be good beca...

Custom User Controls v. Custom Web Controls
Hi! Is it better for me to begin coding my controls instead of just designing them? What would the benefits be? I meen, i seem to be able to get all i need from just putting stuff together on an ASCX file but i'm obviously missing a huge concept here... please explain! Hi, creating user controls is indeed easier than creating custom server controls because you can simply drag & drop other controls on the form, easily add events to it, ... Custom controls however are better when you want to reuse them in several other projects. I like to create custom controls for small, reusable com...

Add .Net Control to Web Custom Control
 I want to add .NET Control (like: TextBox, Button...) to Web Custom Control.How i can do it? Alphavn That's called a composite control -- "Mark As Answer" if my reply helped you -- Hello Guys What gunteman said, that is one approach and in most cases the right one.But its also possible to add child controls to a Control thats inherit from WebControl itself. Be sure to implement INamingContainer to that inherited Control too, thats the important point of that approach.--Microsoft MVP - Visual Developer ASP / ASP.NET- http://www.aspnetzone.de/blogs/peterbuch...

error parsing web control inside custom control
I have the following: ------------------------------------------------ <!-- page.aspx --> <%@ Page Language="C#" %> <%@ Register TagPrefix="MyTag" tagname="PageTemplate" Src="./Includes/DefaultPageTemplate.ascx" %> <script runat="server"> protected void Page_Load(Object Src, EventArgs E) { //!!!!!!!!!!!!!!!!!!!!!!!! label1.Text = "asdf"; //! the line above causes an error !!!!!!! //!!!!!!!!!!!!!!!!!!!!!!!! } </script> <MyTag:PageTemp...

Creating a custom web control in a web site project
For purposes of a quick test I'd to create my custom web control inside my web site project.  I added the class to the App_Code directory, however I'm having trouble figuring out how to reference the control on my aspx page. Any ideas? -Thx   You can do this by...<%@ Register  TagPrefix="cc" Namespace="CustomControlNameSpace" %>For details you can see http://forums.asp.net/t/1176378.aspx. Thanks.. Thanks..SukdebPlease click on 'Mark as Answer' if this post answered your question!...

what is the difference between web custom control,web user control,component class
please tell me in detail what is the web custom control,web user control,component class and what is the difference between web custom control, web user control,component class and when to use web custom control, when to use web user control, when to use component class Oh gosh. Such a nice question! I recommend you to start with this link from MSDN click here . I think you'll need a lot of coffe :) .George (.NET or .NOT) www.piasi.org...

User Control VB.Net x Web Custom Control
I was thinking in create a user control in VB.Net, and use it in a Asp.Net as possible? So I thought about it is gonna be better than make a Web Custom Control, so i thought again, nope... But i need to know better because a don't have a progress bar in asp.net for example.... Could Somebody tell me about??? in a reallity i know the asnwer but i would like to explain by myself... Thank's Antonio...

Web resources about - How to write a file into web project folder from inside a custom web control? - asp.net.custom-server-controls

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Venezuela's Opposition Wins Control of Legislature - Al Jazeera America
... celebrate the closing of a polling station during legislative elections in Caracas, Venezuela, Dec. 6, 2015. The opposition won control of the ...

The ACLU backs using the terror watch list for gun control, but only “with major reform”
... did say, through a spokesperson, that the watch list would need “major reforms” in order to be used as an effective tool for gun control and ...

With gun control off-limits, politicians want tech sector to fight terror
... very next day, the Senate voted against a measure that would have barred gun sales to people on federal terror watchlists. Another gun-control ...

Obama calls for better gun control, and for tech companies to help fight terrorism
President Barack Obama all but called out encryption in a 15-minute Address to the Nation speech on Sunday night. The President touched on various ...

Obama speaks on ISIS, gun control, tolerance in Oval Office address - Videos - CBS News
In a primetime speech Sunday night, President Obama said the terror attack in San Bernardino, California, shows terrorism is now in a new phase. ...

Sugr Cube is a Sweet Spotify Speaker with Touch & Motion Control
... goodies, like Spotify Connect, Pandora, and, eventually, Air Play integration. Sugr also had a little bit of fun with volume and track controls ...

Windows 10 vs. OS X: Which gives sys admins more control?
Nearly everything can be managed as if it were a mobile device, using APIs at the operating system for assured reach and consistent implementation ...

NV's Fiore: 'That 5 Year Old Grandson Of Mine Has Total Trigger Control'
It's very likely you've seen Michele Fiore's family Christmas photo by now, it's been all the rage at Idiocracy viewing parties everywhere. If ...

The Solution Isn’t As Simple As Gun Control
... latest column over at the Daily Beast details how, in the wake of the San Bernardino shootings, Democrats were quick to pounce on the gun control ...

Resources last updated: 12/9/2015 12:53:18 AM