Jump to content
Xtreme .Net Talk

RTT

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by RTT

  1. found solution to my problem: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_vsto2003_ta/html/odc_VSTMultCR.asp
  2. I'm using windows 2000 with excel 2000 SP3, i import the microsoft office 9.0 object library. But when i user your code i receive the error "System.Runtime.InteropServices.COMException (0x80028018): Old format or invalid type library." at those lines like: Excel.Workbooks.Add() also when i use code i find at http://support.microsoft.com/kb/319180/EN-US/ http://support.microsoft.com/default.aspx?scid=kb;en-us;306022 seems like they al use 10.0 object library, but i only have the 9. isn't theire any simple solution to import my datatable or may datagrid to excel? i think i try almost everything. :s does anybody has an idea or some code to create an excelfile from a datagrid of datatable....
  3. I can access a directory with this code. Dim strPath As String = "\\be0001\Users\josgijsens" 'Dim strPath As String = "c:\" Dim strFile, strDir As String For Each strDir In Directory.GetDirectories(strPath) RichTextBox1.AppendText(Path.GetFileName(strDir) & vbCrLf) Next For Each strFile In Directory.GetFiles(strPath) RichTextBox1.AppendText(Path.GetFileName(strFile).ToString & vbCrLf) Next with this code i can read the directories and files on my harddisks or on an network directory "\\be0001\Users\josgijsens". My current problem is that i'm the user with rights on "\\be0001\Users\josgijsens" but if i want to view an other folder "\\be0001\Users\markwouters" i don't have the rights to is. I should be able to acces the folder as a different user. so before i try to access it i should somehow make sure that i access it not as the user that run the code but as a user given in codebased with rights to all folders. is that possible? second question. you can search a folder with GetFiles(strPath, "*.mp3") but that will only search in de current path and not in the subfolders. is there a way to search a complete map including subfolder? of will i have to write my recursive method myself? thxs
  4. working with folders and files i want to create an application to search files on a server. But i don't know where to start. is there anyone who has code that he or she is willing to share? I'm searching for code to search files with a specific extension. I think to main problem is that the directory's i want to search are on an computer in the network and i should reach them as \\computername\directory\.... also i should be able to read those directory's as a specific user. So how can i read in a directory over the network while authentication with a specific username? kind regards
  5. im trying to does this from a web application indeed.... outlook is running and installed at the user. the draft saving works... any idea where i can find the methods for outlook?
  6. I found this code: http://www.c-sharpcorner.com/Internet/SendingEmailsThroughOutlookCB.asp and this work partly... with this code i can save the mail in the draft folder. But i can't get it to display to the user. mailitem.display does not seem to work. so now i'm searching for a way to open of focus on the mail in outlook once it's created.... does anybody has an idea how i can do this?
  7. Hi, In my code i want to open a mail template like when you click a mailto-link, so the person views the mail, but the mail uses a certain template. Certain things should already be filled in when the person gets the mail. Like send to, subject and some parts of the template. Other things have to be filled in by the person himself. after the mail is ready he just has to hit send to send the mail. So the mail should open in outlook using a template where parts are filled in in advance. Does anybody has an idea on how to start on this? thxs in advance.... greetz
  8. here is my current situation. I develop a program on my computer's localhost. From there i contact Active directory succesfull using a connectionstring like: LDAP://OU=BE,OU=SE,DC=eu,DC=aagp,DC=corp. This works fine. My computer is in and OU under the BE folder, and so is my User. I have no problems connecting to the Active Directory. But now that my code is finished i want to put it online on one of the company servers. but when i use the connectionstring there it gives an error that "The specified domain either does not exist or could not be contacted". As i was programming i noticed that i couldn't reach branches of the Active directory that were above my branch... and maybe the problem here could be the same, that the server isn't in a correct place to use the connectionstring. On what base does .NET connect to Active directory using the LDAP-string? When i checked the active directory i saw that the server is under the same branch as my computer i use to develop. My computer is under LDAP://OU=Laptops,OU=BE,OU=SE,DC=eu,DC=aagp,DC=corp and the server is under LDAP://OU=Server,OU=BE,OU=SE,DC=eu,DC=aagp,DC=corp. Seen that my computer can connect from there i don't think it would be a problem for the server since it's under the same branch.... Maybe some kind of user-based error? If i know on what base LDAP connects with the Active Directory, then maybe i could find out what the problem is...
  9. i can search the active directory to find the groups and i can search users and find out of what groups he's a member. But now i have to find a group, and find out what groups he's a member of, but i don't know where to start.... anybody who has an idea? thxs in advance
  10. i want to make it so, that when an error accurs, the people get redirected to an error page, and that the error is being send to me. in the web.config file i added: <customErrors defaultRedirect="error.htm" mode="RemoteOnly" /> in the global.asax i added: Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs) 'Fires when an error occurs sendmail(Server.GetLastError) End Sub with the function: Dim mail As New MailMessage mail.To = """name"" <email@email.com>" mail.From = """ Error "" <email@email.com>" mail.BodyFormat = MailFormat.Html mail.Priority = MailPriority.High mail.Subject = "Error Report - " & Date.Now.ToString mail.Body = "" mail.Body += "<u><b>ErrorMessage:</b></u><br>" mail.Body += Ex.Message.ToString & "<br><br>" mail.Body += "<b>exception: </b>" & ex.ToString mail.Body += "<br><br><b>Reported on: </b>" & Date.Now.ToString SmtpMail.SmtpServer = "BEXXGHE01IS0020" SmtpMail.Send(mail) it works, i get an email when an error accurs and the user is redirected, but i always get something like this: the error is always of the type System.Web.HttpUnhandledException, while i know the error should be of other types. anybody who knows what causes this and how to solve it?
  11. I think i narrowed down the problem. I wanted to build a system to report problems. So on every page i created this try-catch: try... ... ... Catch ex As Exception Response.Redirect("error.aspx", False) End Try in the try-block i frequently used Response.redirect("page.aspx), but then he always reported an error of threadstop or something. I looked around and i read the tip of using Response.Redirect("page.aspx", False). Maybe that has something to do with it, Maybe some sources don't get disposed or something like they used to do. It's the only big change i made before the error accured. Maybe some people know this, or know a better way to redirect in the middle of a method... hope somebody know a solution because i'm out af ideas... thxs in advance
  12. I keep receiving an SQL error. Not everytime but frequently. Does anyone know what to problem could be? This is the error i recieve: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. and this is how u connect: conn = New SqlConnection("workstation id=" & Server & ";packet size=4096;integrated security=SSPI;data source=" & Server & ";persist security info=False;initial catalog=" & DB) conn.Open()
  13. he creates the hidden field, but it still doesn't work to submit the form when i hit enter while i'm in the passwordfield for example
  14. <form id="Form1" method="post" runat="server"> <asp:textbox id="TxtEmail" tabIndex="1" runat="server" Width="272px" ToolTip="Enter your emailaddress for authentication"></asp:textbox> <asp:textbox id="TxtPassword" tabIndex="2" runat="server" Width="272px" ToolTip="Enter your domain password" TextMode="Password"></asp:textbox> <asp:linkbutton id="BtnLogin" tabIndex="3" runat="server">Login</asp:linkbutton> </form> This is the form as i use it for my user to enter thier login information. But now they have to click the link in order to log in. Is it possible to submit the form when 'enter' is pressed (like it's the case with input type="submit" in standard html forms). does anyone know how to do this?
  15. thxs... that solved the problem indeed... didn't know u had to use that to trigger validation.. thxs
  16. It's my first time i want to write a cotum validator but it doesn't seem to work. In de page i've put this validator: <asp:CustomValidator id="CVFBeginDate" OnServerValidate="CVFBeginDate_ServerValidate" runat="server" ErrorMessage="Please fill in a valid date as startdate" ControlToValidate="TxtBeginDate">*</asp:CustomValidator> in de codebehindpage i have created this sub: Protected Sub CVFBeginDate_ServerValidate(ByVal source As System.Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CVFBeginDate.ServerValidate Try tmp = args.Value.Split("/") testDate = New Date(tmp(2).ToString(), tmp(1).ToString(), tmp(0).ToString()) args.IsValid = True Catch args.IsValid = False End Try End Sub it doesn't seem to work. do you have to put something special to the custom validator?
  17. i created the table with table properties at load time.. it works... just somthing you have to keep your mind to...
  18. I have to build a form that is very variable. So i would like to write the HTML for the table out of the VB code. How can this be done? It's like the way i do it in php, there i can easily check certain things and write out a part of a table depending on the checks i made in php... for example for vb dim i as boolean = true if i then 'here i should find a way to write the html needed so it can be displayed on the site. end if all idea's are welcome.. thxs
  19. I have a situation and i don't know how to start to solve it the best way possible. I have to make an ASP VB.Net web application with an complex calendar I have a database where events are entered (for example: meeting on 18/3/2005 from 8:00 till 10:00) and i have to display an overview of it by day. So if i ask a calendar for 18/3 i should see an overview of the complete day hour by hour. The hours that are busy should be show in a different color (a little like the outlook calendar or look at the screens i made from how i want it to look http://gradict.kahosl.be/tom.rubbens/screens.pdf). The free hours should be clickable so you can go to a page te directly book for the clicked hour, and the events in the calender should be clikcable to view the details. After i made it for one day i would make it for a week and a month. but i really don't know where to start? since almost everything has to be clickable i think it will be very complex but maybe somebody has a great idea of how to approach it.... any suggestions are welcome thxs
×
×
  • Create New...