Jump to content
Xtreme .Net Talk

tate

Avatar/Signature
  • Posts

    116
  • Joined

  • Last visited

Everything posted by tate

  1. If you are personally running a web server then you are in control of setting up the smtp mail server. However, if you utilize a company to host your web pages then all of the email generated from your web page will be processed by the host's smtp server. The web host will most likely provide instructions on how to utilize their smtp server with your ASP.NET pages. Here is what one of my hosts provided to make sure your code was setup properly; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Send Email in ASP.NET The information in this article applies to: ASP.NET Email DETAILS <%@ Page Language="VB" %> <script runat="server"> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim mailMessage As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage mailMessage.From = "you@yourdomainname.com" mailMessage.To = "someone@somewhere.com" mailMessage.Subject = "This is a sample mail sent from ASP.net Mail Component" mailMessage.BodyFormat = System.Web.Mail.MailFormat.Text mailMessage.body = "Congratulation" & VbCrLf & "If you receive this is, your mail component works" System.Web.Mail.SmtpMail.SmtpServer = "localhost" System.Web.Mail.SmtpMail.Send(mailMessage) lblMessage.text = "Mail Sent" End Sub </script> <html> <body>> <form runat="server"> <asp:Label id="lblMessage" runat="server"></asp:Label> </form> </body> </html> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In addition to the above information you may want to research the following web page; http://www.systemwebmail.com/ Hope this helps you on your journey! Tate
  2. I have used web controls with no problem. By the way, make sure your smtp string is setup based on the web hosts recommendations. Each host may be different.
  3. Here is an example I quickly grabbed of formating a date field inside a datagrid column; <asp:BoundColumn HeaderText="Order Date" DataField="OrderDate" DataFormatString="{0:MM-dd-yy}" ItemStyle-HorizontalAlign="Center"/>
  4. I guess I should have been a little more specific. I have encountered numerous problems when trying to install Visual Studio when there was a prior version already on the machine. If the PC was of a virgin nature I have not had any problems. In this particular instance the PC already had Visual Studio 2002 with framework 1.0 in it. My goal was to uninstall these and install Visual Studio 2003 and framework 1.1. My troubles began when the uninstall of Visual Studio 2002 was not successful. No reason was given it just hung part way through. Every future attempt was unsuccessful as well. So my only recourse was to manually delete everything from the harddrive and to comb the registry to delete all traces. As you can imagin this was an exercise in futility. In addition I manually deleted the framework 1.0. Norton WinDoctor was used to clean up things a bit before the new install. While running the 2003 setup (antivirus and firewall disabled), as expected, the Runtime files, framework 1.1, and the J# redistributable needed to be installed first. The Runtime files appeared to load OK and then hung at the very end. No error given it just hung there. So I manually installed the framework 1.1 and J# redistributable using seperate files pulled from Microsoft. When I ran the 2003 setup again only the Runtime files were needed as expected. Once again my machine hung at the end of this install. After pulling my hair out and yelling at Bill Gates I finally found the thread suggested MSCONFIG. After following the recommendations for only running the bare essentials the install went through like a charm. Now why doesn't Microsoft's install instructions just inform you how to do this from the start if it is so darn important? Their instructions only recommend that all background applications be closed. Normally this would mean to me that I close everything that is shown in the system tray. I didn't know about the use MSCONFIG. Just because items in the system tray are closed doesn't insure things are not running still. Tate
  5. Wow, why does the installation of Visual Studio have to be so difficult. I have never seen a program that is so particular except for deployment of an application that is created in .NET. For those who may have run into the same problem my advice would be to closely evaluate the need for each item running in the background. Just disabling your antivirus or firewell doesn't do it. After many trips to the Internet to review stories of other unhappy installers I found a thread suggesting the use of MSCONFIG. Running this routine, unchecking all of the "Load" items, then only selecting "Windows Installer" in the services tab did the trick for me. Hopefully this information will prevent someone from pulling out all their hair. :)
  6. Set AutoGenerateColumns property to "False" and create your own BoundColumn subcontrol to lay out your grid. This will allow you to use the DataFormatString property. Below is an example for you to review. <asp:DataGrid id="DataGrid1" BorderColor="gray" runat="server" AutoGenerateColumns="false" CellPadding="2" Font-Name="Arial" Font-Size="10pt" HeaderStyle-BackColor="lightgreen" AllowPaging="True" PageSize="4" PagerStyle-Mode="NumericPages" OnPageIndexChanged="DataGrid1_PageIndexChanged"> <Columns> <asp:BoundColumn HeaderText="Customer#" DataField="CustNum" ItemStyle-HorizontalAlign="Center"/> <asp:BoundColumn HeaderText="Last Name" DataField="LastName"/> <asp:BoundColumn HeaderText="Order#" DataField="OrdNum" ItemStyle-HorizontalAlign="Center"/> <asp:BoundColumn HeaderText="Order Date" DataField="OrderDate" DataFormatString="{0:MM-dd-yy}" ItemStyle-HorizontalAlign="Center"/> <asp:BoundColumn HeaderText="Item Description" DataField="Description"/> <asp:BoundColumn HeaderText="Quantity" DataField="LIQuantity" ItemStyle-HorizontalAlign="Center"/> <asp:BoundColumn HeaderText="Unit Price" DataField="Price" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="Right"/> <asp:BoundColumn HeaderText="Ext Price" DataField="ExtPrice" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="Right"/> </Columns> </asp:DataGrid>
  7. Hey I finally found the DataFormatString property! That did the ticket.
  8. I'm learning how to use the datagrid control and can't figure out how to format a couple pieces of data. All of the data is pulled in and assigned to a dataview. The dataview is then bound to the datagrid. Once this is done is there a way to format the data in a particular column? For example; I would like to take the "price" data and format it as currency so I get the $ symbol and 2 decimal places. Another item is format date/time data into MM-dd-yy instead of the long version. Thanks for the tips Tate
  9. Thanks I see how the SQL statement is utilized now. My hope is to utilize a datagrid to display the results. So I can use the SELECT statement when creating the data adapter. Now. most of the time when I fill a dataset a specific table is given as part of the syntax. How do you accomplish this when multiple tables are involved or should a dataview be created?
  10. Well, I have spent uncountless hours searching for examples on how to code a web project that utilizes relationships between multiple tables without any luck. I found numerous examples of how to iterate through a single one-to-many realtionship but that was about as adventurous as it got. My challenge (see atttached relationships) is to generate a datagrid with the following output; Customer # Last Name Order # Order Date Item Desc Order Qty Order Date Unit Price Ext Price Can anyone point me to a good reference or provide some sage advice on how to navigate through the relationships to produce the required output? Thanks in advance for your help. Tate
  11. That it why I just use a text editor for ASP.NET application instead of VS. I haven't discovered why VS should be used for yet. Now, for client server applications I think it is great.
  12. Thanks for all the help.
  13. As part of a little windows app I have created there is a label, tabindex = 1 combo box1, tabindex = 2 combo box2, tabindex = 3 combo box3, tabindex = 4 text box, tabindex = 5 rich text box, tabindex = 6 My problem is that the combo box1 has focus after the form has loaded. Therefore, it is highlighted (blue). I would like the form to load such that no control has focus. Even assigning focus to the text box after frmMain_Load doesn't change this. Any idea how I can resolve this? Thanks for the help.
  14. You don't have to initialize every element of an array unless you know exactly what the array will hold. If you don't know how many items will be in the array it is possible to REDIM the array as it grows or shrinks.
  15. Have you tried to deploy your project anyway?
  16. I have been using discountAsp.net as a host and have found them to be very helpful. Technical support is pretty prompt and accurate.
  17. I'm having a hard time understanding what you are asking. Are you looking for something like this; <script> Dim strTextContent As String strTextContent = txtTextBox.Text lblRepeatText.Text = strTextContent </script> <form runat="server"> <asp:textbox id="txtTextBox" runat="server"/> <asp:label id="lblRepeatText" runat="server"/> </form>
  18. Make sure the asp.net file you are trying to run is located in a IIS virtual directory!
  19. Appears the Mod function returns the same thing as the IEEERemainder function. Either will work fine now that I understand them better. Thanks for everyone's input. Tate
  20. I'm not aware of any such syntax. What does the "%" character do? I can't find any reference to it in the Visual Studio help index. Thanks for the reply.
  21. I'm sure there has to be a simple way of doing this but I have spent hours pouring over web pages and books but can't get started in the right direction! What I would like to do is evaluate a text box to determine if there is an even number of characters. I thought I could do use something like this; IEEERemainder(txtField.Length, 2) If the returned value was greater than 0 then apparently there would not be an even number of characters. However the results were rather unpredictable. Any suggestions would be greatly appreciated. Tate
  22. I'm entertaining the idea of creating a shareware program that will be fully functional for say 30 days. After that a registration number is required or the program will not function. Can anybody give me some direction where I can find some information on how to accoplish this with a VB.NET application (not web based)? Thank you so much for your help.
  23. Something doesn't sound quite right. Text font size if specified in your html code will always remain the same. However, as the resolution increases the text will appear smaller; especially if you have not chosen to install larger fonts when changing to say 1024 x 768. Make sure your font size is specified in your code (<font name="Arial" size="3">). To insure your text and table stay in the correct position try wrapping all of your html in a 1x1 table and specify the size; <table width="600" align="center"> <tr> <td><table width="100%"></td> </tr> </table>
  24. Using a service to process credit cards like PayPal may be another option. This is very well suited for low volumes of credit card purchases.
  25. I just finished an application that interprets the J1850 data communication that takes place between electronic modules on a vehicle. Next, something for the web since I'm on my way to my first ASP.NET class this semester.
×
×
  • Create New...