|
If it's that urgent, would google not be a better place to start for this simple treeview style tutorial...
http://www.google.ie/search?rlz=1C1GGLS_en-USIE299IE303&sourceid=chrome&ie=UTF-8&q=populate+a+Web+treeview
|
|
|
|
|
When trying to send an excel file as an attachment the second time i got this error. I am saving the excel file in a folder on the server
P.S. The first time i send it normaly.
URL: /Transportation/TransportationForm.aspx?m=6&y=2008&t=send
Error Message: The process cannot access the file 'C:\web\Transportation\Attachments\TransportationForm-148.xls' because it is being used by another process.
Error Source: mscorlib
Stack Trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamWriter.CreateFile(String path, Boolean append) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) at Microsoft.VisualBasic.FileIO.FileSystem.WriteAllText(String file, String text, Boolean append, Encoding encoding) at Microsoft.VisualBasic.MyServices.FileSystemProxy.WriteAllText(String file, String text, Boolean append) at Library.AppEmailService.SendReport(Control report) at TransportationForm.ReportAction() at TransportationForm.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
|
|
|
|
Sounds like whatever you are doing the first time around, you are not releasing this excel file properly.
Are you building this excel file on the fly? Are you disposing of all your objects properly (look at using 'USING' blocks in your code)?
|
|
|
|
|
Iam using this code:
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"
HttpContext.Current.Response.Charset = ""
Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
report.RenderControl(hw)
Dim userId As Integer = HttpContext.Current.Session("userId")
Dim attachment As String = HttpContext.Current.Server.MapPath("~\Attachments\TransportationForm-" & userId & ".xls")
My.Computer.FileSystem.WriteAllText(attachment, tw.ToString, False)
tw.Close()
hw.Close()
tw.Dispose()
hw.Dispose()
AppEmailService.SendMail(attachment)
Any Help
|
|
|
|
|
Hi,
I created a TextBox derivated class and I'd like to link it to a Label using a property, so here is what I need:
1) Create a property editor that shows a list of all available labels in the Page
2) Using the labels name, I need to get the UniqueID (ClientID), so I can use it with javascript.
Any tutorials about that?
Thanks,
Dirso.
|
|
|
|
|
hi,
Here is the code I've got so far, the ListBox works fine, but how do I populate it with the Labels? I can't access the Page object from it, right?
internal class LabelSelectTypeEditor : UITypeEditor
{
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
{
return UITypeEditorEditStyle.DropDown;
}
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
{
IWindowsFormsEditorService srv = null;
if (provider != null)
srv = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
if (srv != null)
{
System.Windows.Forms.ListBox lb = new System.Windows.Forms.ListBox();
lb.Items.Add("test1");
lb.Items.Add("test2");
srv.DropDownControl(lb);
return lb.Text;
}
return value;
}
}
Thanks,
Dirso
|
|
|
|
|
My goal is to create a property editor like the one available for the Label's AssociatedControlID.
|
|
|
|
|
i am getting whole html code in two line is there any way to get it back in previous form???? or in multiple lines?????
umerumerumer
|
|
|
|
|
Try pressing CTRL, K and D keys together.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
In Visual Studio, GoTo Edit -> Advanced ->Format Document.
Make sure all html tags have a closing tag, otherwise the document will not be formatted.
Hope this helps.
|
|
|
|
|
Highlight the code of interest (ctrl +A highlights all) right click and choose 'format selection'
|
|
|
|
|
Greetings,
Go to Visual Studio - Tools - Options - Environement - Keyboard, now for the first drop down list select Visual C# 2005 or make sure its selected, then on the Page you want to format Click Ctrl E, D this will reformat the page or any other document types in Visual Studio.
Sincerely Samer Abu Rabie
Note: Please remember to rate this post to help others whom reading it.
|
|
|
|
|
i hav a dropdown lis t containing financial years.
i want the previous fiscal of selected fiscal.
Can anybody give me some idea.
I tried but i couldn't.
Please send me reply if u r free
tanks in adv.
Am using .net v1.1
kissy
|
|
|
|
|
can you be little detail about the scenario
Cheers!!
Brij
|
|
|
|
|
Hi,
There are four radiobutton(radiobuttonlist control) on selection of each radiobutton it will executed selectionchanged event to perform some code behind action.
How do we control radiobutton selection with keyboard down/up arrow in asp.net.
Could pls. suggest me how to implement this.
Send me any sample implementation which is pertinent to this requirement.
|
|
|
|
|
As always, to do anything with events on the client side involves writing javascript. ASP.NET really has nothing to do with it, you're sidestepping all the stuff that ASP.NET does to create some custom behaviour and hoping that your clients notice that your website behaves differently from any other, in a way that's not immediately obvious.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
|
hi i got web service who send me an xml Data in a web application, i want to merge the sent data in word model to generate a report
printed in client Side is there any tutorial to show how to proceed to do this, or what kind of documentation i must use.
thank you for you answer
|
|
|
|
|
If you want your client to print a word doc, you'll need to send it to them. Really, none of this question is to do with ASP.NET. You can control Word in C# tho using the Microsoft Tools for Office, and insert your data, creating a new document you'll need your user to open.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hi
i developed a site and it is hosted in one server name "S1".
Database for this site and third party software "xyz" is maintained in another server name "S2".
now i want to add refernce of the third party software in a webpage and its object should be created at server "S2".
any time the user requests the page, the refernce should come thru server "s2" but not from the hosting server
plz help me
thanks in advance
vijay kumar D
|
|
|
|
|
Sounds like you need to write a webservice for S1 to consume and S2 to host.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
Do any one know how to select multiple files at a time using Ctrl+select and upload the attachments in C# .Net 1.0?
I know that by placing 4 or 5 attachment controls we can do that.But I want to select multiple at a time.
Do any one know this???
Sowmya
|
|
|
|
|
It's not possible in ASP.NET. ASP.NET can only upload controls according to what the HTML upload control allows. One control, one file.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
I wanted to display News in my Intranet website. I dont have any idea about that. Please guide me accordingly.
I wanted to use web services in my site. But, how do i know that what are the web methods available over internet? I know how to create a webservice and use it. I am asking about the webservices which are in internet, and how to use them.
Thank you.
modified on Tuesday, December 2, 2008 3:20 AM
|
|
|
|