
Jeff B
Members-
Posts
20 -
Joined
-
Last visited
Personal Information
-
Visual Studio .NET Version
Visual Studio .NET Enterprise Architect
-
.NET Preferred Language
VB.NET, C#
Jeff B's Achievements
Newbie (1/14)
0
Reputation
-
Anytime. Glad I could help.
-
This should do it for you. <script type="text/javascript"> function setVisibility(checked){ var textbox1; var textbox2; if (document.getElementById){ textbox1 = document.getElementById('first'); textbox2 = document.getElementById('second'); } else { textbox1 = document.all('"first'); textbox2 = document.all('second'); } if (checked){ textbox1.style.visibility='visible'; textbox2.style.visibility='visible'; } else { textbox1.style.visibility='hidden'; textbox2.style.visibility='hidden'; } } </script> <asp:CheckBox ID="chk" Runat="server" Checked="False" onClick="setVisibility(this.checked);"></asp:CheckBox> <asp:TextBox ID="first" Runat="server" style="visibility:hidden;"></asp:TextBox> <asp:TextBox ID="second" Runat="server" style="visibility:hidden;"></asp:TextBox> Notice that I used the style="visibility:hidden;" in the textbox server tags instead of Visibility="False". This was because the textboxes don't get added to the elements collection, and therefore cannot be accessed in the javascript. Also, this javascript should work with all browsers except, Netscape 4. It was checked with IE 4+, Netscape 6+, Opera, and Firefox.
-
This Works For Me This works for me. Imports System.Web.Mail . . . 'Create an instance of the MailMessage class Dim mail AsNew MailMessage 'Set the To field mail.To = "someone@someisp.com" 'Set the From field mail.From = "someone@someisp.com" 'Set the CC field mail.From = "someone@someisp.com" 'Set the Bcc field mail.Bcc= "someone@someisp.com" 'Send the email in HTML format mail.BodyFormat = MailFormat.Html 'Set the priority - options are High, Low, and Normal mail.Priority = MailPriority.Normal 'Set the subject mail.Subject = "Some Subject" 'Set the body mail.Body = "<html><bodyThis is an HTML email with an attachment.</body></html>" 'Set attachments mail.Attachments.Add(New MailAttachment("C:\somefile.html")) 'In order to specify a different SMTP mail server to use to send the message, 'set the SmtpServer property: '************************************* 'SmtpMail.SmtpServer = emailServerName '************************************* 'Be careful, though. Since this is a static property, 'changing this value in one ASP.NET Web page will affect 'all ASP.NET Web pages using sending emails via the SmtpMail object. 'That is, if in one ASP.NET Web page you set the SmtpServer 'property to myMailServer, and then, in another ASP.NET Web page, 'do not specify the SmtpServer property, intending to use 'the default SMTP server, myMailServer will be used instead. 'For that reason, you should probably always specify 'the SmtpServer property - if you want to use 'the default SMTP server, simply do: '*********************** SmtpMail.SmtpServer = "127.0.0.1" 'Now, to send the message, use the Send method of the SmtpMail class SmtpMail.Send(mail)
-
That should work. I've use the same method before and it worked fine. Now though, I usually use templated columns and code-behind functions to do any "creative" formatting on my data.
-
Absolutely, I have been involved with .Net since the early Alpha days.
-
It works great. I use it all the time. You can use that method to access other html page tags as well, such as the Body tag. Yeah, I guess I did raise this one from the dead. I was going to start looking at the old post to see which ones were never answered. I see if I could help. Someone might still have a question like it.
-
Hopefully, that should work for you. If you have anymore questions, just let me know. I'll get it working for you.
-
I'm a little confused about your question, but is this what you are looking for? In the templeted column of the datagrid with the hyperlink: <asp:HyperLink ID="lnkToPage" Runat="server" NavigateUrl='<%# BuildUrl(DataBinder.Eval(Container.DataItem, "NeededDatabaseValue1"), DataBinder.Eval(Container.DataItem, "NeededDatabaseValue2")) %>'></asp:HyperLink> In the code-behind: Public Function BuildUrl(ByVal objValue1 As Object, ByVal objValue2 As Object) As String Dim ReturnValue As String = "PageToLinkTo.aspx?" Try If Not IsDBNull(objValue1) Then If CType(objValue1, String).Trim().Length > 0 Then ReturnValue += CType(objValue1, String).Trim() & "&" End If End If If Not IsDBNull(objValue2) Then If CType(objValue2, String).Trim().Length > 0 Then ReturnValue += CType(objValue2, String).Trim() & "&" End If End If Return ReturnValue Catch ex As Exception Throw New ApplicationException("An error occurred while trying to build the url.", ex) End Try End Function
-
In the *.aspx, add the following attributes to the Title tag: <title ID="title" Runat="server"></title> In the *.aspx.vb, add the following control declaration: Protected WithEvents title As System.Web.UI.HtmlControls.HtmlGenericControl Now you can programatically set the page's title: title.InnerText = "Page Title"
-
Why are you using Recordset with ASP.NET??????? You should be using one of the intrinsic .Net Data Objects; DataAdapter, DataReader, DataSet
-
Have you checked out DotNetNuke? I believe that version 3.0 is due out on November 1st, 2004. Note: I am in no way affiliated with DotNetNuke or am I endorsing the product. I am just passing on information about good and FREE component for .Net Web Development.
-
How about just: PublicFunction IsDateValid(ByVal dateToCheck As DateTime, ByVal startDate As DateTime, ByVal endDate As DateTime) AsBoolean If dateToCheck >= startDate And dateToCheck <= endDate ThenReturnTrue Else ReturnFalse EndIf EndFunction
-
MSN Search directions - Acroterion Prediction "Commercial search pays the bills, algorithmic search keeps the customer happy". MSN has deals with Inktomi and LookSmart to power its Web search results, though the future of its deal with Inktomi has been questionable since Yahoo acquired the company late last year. Still, for all its resources and influence, Microsoft has yet to find a runaway winner in consumer services--and, in fact, continues to suffer from the failures of its last high-profile initiative launched three years ago. A planned consumer-oriented Web service, called .Net My Services, was eventually shelved because of market confusion, a lack of partners and other factors. Taken from: http://www.acroterion.ca/Academy_Research_MSN_Search_Analysis.html
-
Yes, DONT use frames, use user controls to "host" the menu, ie: menu.ascx instead of menu.aspx.