|
Thanks for reply, I would like to try something easy (HTML, PDF) Do you have a sample sript I could use to modify for my needs? I simply want the web visitors inputs from a web form to be placed in a document (it does not matter what type, html, pdf, word I will work with what is ever easier at this point. Their answers will be placed in the document at various locations. Whats the easiest script to use?
Thanks for the help...
|
|
|
|
|
Hi, I'm trying to set the background color for certain listitems in my radiobuttonlist control.
The rbtnl control is inside a repeater. So, for each question, populate x amount of questions.
I want an incorrect answer to have a red background and the correct answer a blue background.
I'm able to set the background colors but I'm not able to set them to the same width since the
listitems correspond to html spans and not tablecells. It will obviously only highlight as
far as the actual text goes. Any ideas?
Here's the code so far:
protected void rpt_questions_OnItemDataBound(object sender, RepeaterItemEventArgs e) {
if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem)) {
... not important code;
DataRowView drv = e.Item.DataItem as DataRowView;
if (drv != null) {
rbtnl_answers.DataTextField = "answer";
rbtnl_answers.DataValueField = "id";
rbtnl_answers.DataSource = drv.CreateChildView("answers");
rbtnl_answers.DataBind();
rbtnl_answers.SelectedValue = choice;
// choice = chosen answer's id
if (choice.Length > 0) {
foreach (ListItem li in rbtnl_answers.Items) {
if ((li.Value == choice) && (correct != choice)) {
li.Attributes["style"] += "background-color: red; color: white;";
}
else if (li.Value == correct) {
li.Attributes["style"] += "background-color: blue; color: white;";
}
}
}
}
|
|
|
|
|
Hi Friends
Please help me out in this situation,
how to open a word template (contain bookmark) from asp.net and vb.net 2003 version.
Functionality when user to generate the template to place bookmark values from sql server db table to be insert into that word document and ask the user to open, save option dialog box as result.
Need urgent please help me
Thanks
Good Heart
-- modified at 13:06 Sunday 18th February, 2007
|
|
|
|
|
Haribabu Krishnamurthy wrote: Need as soon as Possible
How did that work out for you?
only two letters away from being an asset
|
|
|
|
|
Assalam-O-Alaikum ! Dear friends i want to provide email facility at my Web site... when i click on send button, message dispaly "Email has sent" but not deleiverd. Please tell me whats problem.... my code is:
Dim SMTP As New Net.Mail.SmtpClient("185.250.70.125", 80)
Dim Message As New Net.Mail.MailMessage
SMTP.Credentials = New Net.NetworkCredential("mailto@daily-aaj.com", "outgoing")
Message.To.Add("ferozeahmed1@hotmail.com")
Message.From = New Net.Mail.MailAddress("fm_love82@hotmail.com", "itsme")
Message.Sender = New Net.Mail.MailAddress("fm_love82@hotmail.com", "itsme")
Message.Body = "This is a sample mail to test the SMTP Service"
SMTP.Send(Message)
Label6.Text = "Mail has been sent to " & "ferozeahmed1@hotmail.com"
feroze
|
|
|
|
|
If you are sure that there is no error in sending then you should check your email in JunkBox.. Your email might be there..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message. Thank you.
|
|
|
|
|
mail was not in my junk mail too... any other issue?
feroze
|
|
|
|
|
fmlove wrote: Dim SMTP As New Net.Mail.SmtpClient("185.250.70.125", 80)
Are you sure the smtp server is at port 80? Port 80 is usually for http. What happens if you use port 25? Or if you do not specify a port at all?
Wout Louwers
|
|
|
|
|
Thanks for reply dear! yes port is correct and when i use port 25 Failure sending messages display and when do not specify a port same error display
Ferzoe
|
|
|
|
|
I notice your code does not specify an authentication type. This might help:
MailMessage message = new MailMessage(myEmail, myEmail, "subject1", "body1");
// SmtpClient is used to send the e-mail
SmtpClient mailClient = new SmtpClient(smtpServerName);
mailClient.UseDefaultCredentials = false;
CredentialCache myCache = new CredentialCache();
myCache.Add(smtpServerName, 25, "Basic", new NetworkCredential(myUserName, myPassword));
mailClient.Credentials = myCache;
// Send delivers the message to the mail server
mailClient.Send(message);
|
|
|
|
|
Thanks a lot for reply me... i check this code but Failure Sending mail message diplay... i am giving correct information but mail not sent... i am really worry about this problem.have you any other suggestion?
feroze
|
|
|
|
|
Can you reply with the current code you're using?
|
|
|
|
|
Thanks a lot for this kind of kindness my code is:
Private mMailServer As String
Private mTo As String
Private mFrom As String
Private mMsg As String
Private mSubject As String
Private mCC As String
Private mPort As Integer
Dim strMsg As String
strMsg = "Thank you for Feedback"
mTo = Trim(GoNews.Text)
mFrom = Trim("hotshot2000pk@yahoo.com")
mSubject = Trim("Thanks")
mMsg = Trim(strMsg)
mMailServer = "185.109.209.230"
mPort = 387
Try
Dim message As New MailMessage(mFrom, mTo, mSubject, mMsg)
Dim mySmtpClient As New SmtpClient(mMailServer, mPort)
mySmtpClient.Credentials = New Net.NetworkCredential("mailto@daily-aaj.com", "sentto")
mySmtpClient.DeliveryMethod = SmtpDeliveryMethod.Network
mySmtpClient.Send(message)
'Response.Redirect("Default.aspx")
MailSent.Text = "Email has sent successfully"
'MessageBox("The mail message has been sent to " & message.To.ToString())
Catch ex As FormatException
MailSent.Text = "Format Exception: " & ex.Message
Catch ex As SmtpException
MailSent.Text = "SMTP Exception: " & ex.Message
Catch ex As Exception
MailSent.Text = "General Exception: " & ex.Message
End Try
Feroze
|
|
|
|
|
Where have you specified the authentication type? Try this - I assume you userName password combination is "mailto@daily-aaj.com", "sentto". "Basic" is the authType. Good Luck!
Dim message As New MailMessage(mFrom, mTo, mSubject, mMsg)
Dim mySmtpClient As New SmtpClient(mMailServer)
mySmtpClient.UseDefaultCredentials = False
Dim myCache As new CredentialCache()
myCache.Add(mMailServer, mPort, "Basic", New NetworkCredential("mailto@daily-aaj.com", "sentto"))
mySmtpClient.Credentials = myCache
'mySmtpClient.DeliveryMethod = SmtpDeliveryMethod.Network
mySmtpClient.Send(message)
|
|
|
|
|
Hello all
I want to create a base class for my master page, this master page will have many controls.
Q: Can I define them as properities in this calss ?
Q: how can I make them fire events on the master page ?
Q: what if I got a user control on that master page, that contain other controls that need to fire events on the master page, how can this nested controls access/fire objects on the master page?
Thanks, Best Regards
Waleed Seada
|
|
|
|
|
act, creating a base class is something that we used to do in ASP.NET 1.1 dev.
but using master page is for ASP.NET 2.0 ...
so,I'm not very sure why you wanna create a base class for Master Page.
However,if you wanna know how to create base class in ASP.NET 1.1, plz check this post. "ASP.NET 1.1 Training Materials for Beginner". And go to "Creating the Page-Templete in ASP.NET 1.1" section.
Hope it helps.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message. Thank you.
|
|
|
|
|
:(I have created a web application to take a screenshot of current webpage. That works fine from Visual Studio.Net Development Environment. But when i publish it and use it the error comes.
Plase help me it's very urgent.
Server Error in '/SiteCapture' Application.
--------------------------------------------------------------------------------
Retrieving the COM class factory for component with CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39} failed due to the following error: 80070002.
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.IO.FileNotFoundException: Retrieving the COM class factory for component with CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39} failed due to the following error: 80070002.
Source Error:
Line 52: //System.Threading.Thread.CurrentThread.ApartmentState = System.Threading.ApartmentState.STA;
Line 53: //waitForRegister = new ManualResetEvent(false);
Line 54: shellWindows =new SHDocVw.ShellWindowsClass();
Line 55: //Marshal.ReleaseComObject(shellWindows);
Line 56: //Find first availble browser window.
Source File: D:\Test\IECapture\PrintScreen\Screenshot.cs Line: 54
Stack Trace:
[FileNotFoundException: Retrieving the COM class factory for component with CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39} failed due to the following error: 80070002.]
PrintScreen.Screenshot.CreateScreenshot(String urlstring, String imagepath) in D:\Test\IECapture\PrintScreen\Screenshot.cs:54
PrintScreen.CaptureScreen.PrintS() in D:\Test\IECapture\PrintScreen\CaptureScreen.cs:111
PrintScreen.CaptureScreen.OnClick(EventArgs e) in D:\Test\IECapture\PrintScreen\CaptureScreen.cs:98
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
Raj
|
|
|
|
|
How to use SOAP in ASP.NET?
|
|
|
|
|
Just wanted to use.. nothing special??
Then, Just create Web Service and use it.. .NET Web service uses SOAP only..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message. Thank you.
|
|
|
|
|
|
Hi !
i m using opensmtp DLL and by using its class MailMessage i m sending the email.But its method CC takes array list ....but i m unbale to use it.
|
|
|
|
|
Try like that.
Dim myMail As New OpenMails.Smtp.MailMessage
myMail.From.Add(New OpenMails.Smtp.EmailAddress("EEmaan@gmail.com", "Abhishek Joshi"))
Note: Namespace might need to be changed.
|
|
|
|
|
no u didnt got my question..... kindly try to understand that .... I just wanna process with CC i have aready done to from ...n my name space used is " opensmtp" have u any idea abt that
|
|
|
|
|
i got you. man... OpenMail is a project that I port OpenSmtp [C# version] to VB.NET version. I called it "OpenMail".. okay.
Please try like that.
MailMessage mMsg = new MailMessage();
mMsg.Cc.Add(new EmailAddress("aa@gmail.com", "User Name"));
Hope it helps..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message. Thank you.
|
|
|
|
|
Am deploying a Web Application using Visual Studio Setup. Am consideration adding a class library and execute it as a custom action to precompile the deployed Web Application after the installation is complete so that users do not have to endure long waiting time when they are requesting a page the first time.
I need to run
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_compiler -v \MyWebSite inorder to compile.
The compiled output will go the default location i.e. \WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
Which is the best way to run this command from my custom action class library?
|
|
|
|