|
Hi All,
How to call Activex Control methods using javascripts?
In below code...
i am calling a funtion
ActiveXControl.Read()..which is throwing a error
"Object doesn't support this property or method".
But, before calling this method..
i am assigning a value to Activex control Property as....
ActiveXControl.MyParam = "Hello Friends!" which works fine.
Why does the method throw error when propety works fine?
Please guide me.
Thanks in advance.
|
|
|
|
|
Prasadsm wrote: "Object doesn't support this property or method".
I am not sure about the code, but just asking which browser you are using? ActiveX Control works only in IE Browser.
|
|
|
|
|
|
Hello,
i have code to send smtp mail from local system and from configured server.
when i use to send email with all options like from,to,cc and bcc as per the below code
local server(system code works like)
Configuration configurationFile = WebConfigurationManager.OpenWebConfiguration("~/Web.config");
MailSettingsSectionGroup mailSettings = configurationFile.GetSectionGroup("system.net/mailSettings") as MailSettingsSectionGroup;
if (mailSettings != null)
{
port = mailSettings.Smtp.Network.Port;
host = mailSettings.Smtp.Network.Host;
password = mailSettings.Smtp.Network.Password;
username = mailSettings.Smtp.Network.UserName;
}
MailMessage message = new MailMessage(FromAddress, ToAddress, EMailSubject, EMailBody);
if (string.IsNullOrEmpty(ToAddress))
{
message.To.Clear();
message.CC.Clear();
}
else
{
message.CC.Add(ToAddress);
message.To.Clear();
}
if (!string.IsNullOrEmpty(BccAddress))
message.Bcc.Add(BccAddress);
message.IsBodyHtml = IsHTMLFormat;
SmtpClient mySMTPclient = new SmtpClient(host, port);
NetworkCredential userCredetials = new NetworkCredential(username, password);
mySMTPclient.UseDefaultCredentials = false;
mySMTPclient.Credentials = userCredetials;
mySMTPclient.EnableSsl = true;
mySMTPclient.Send(message);
then it is working fine.
from the above code all the mails will be sent from one singe from address like "abc.gmail.com" irrespective of from address at runtime.
from the hosting server
to accomplish this i have used code as below
System.Web.Mail.MailMessage mailMessage = new System.Web.Mail.MailMessage();
mailMessage.From = FromAddress;
if (!string.IsNullOrEmpty(BccAddress))
{
BccAddress = BccAddress.Replace(",", ";");
mailMessage.Bcc = BccAddress;
}
if (!string.IsNullOrEmpty(ToAddress))
{
ToAddress = ToAddress.Replace(",", ";");
mailMessage.Cc = ToAddress;
}
mailMessage.Subject = EMailSubject;
mailMessage.Body = EMailBody;
if (IsHTMLFormat)
mailMessage.BodyFormat = System.Web.Mail.MailFormat.Html;
else
mailMessage.BodyFormat = System.Web.Mail.MailFormat.Text;
mailMessage.Priority = System.Web.Mail.MailPriority.Normal;
System.Web.Mail.SmtpMail.SmtpServer = "127.0.0.1";
System.Web.Mail.SmtpMail.Send(mailMessage);
mails will be sent from the user who ever sends.
but the problem is what ever email have added to Bcc are not sent and rest from and cc are working fine.
this is very important to me because we intend to stop release because of this.
any solution would be highly appreciated.
|
|
|
|
|
Can you please Reformat your code ?
Please put your code inside CODE Block Or PRE Tag. Like below,
Configuration configurationFile = WebConfigurationManager.OpenWebConfiguration("~/Web.config");
MailSettingsSectionGroup mailSettings = configurationFile.GetSectionGroup("system.net/mailSettings") as MailSettingsSectionGroup;
if (mailSettings != null)
{
port = mailSettings.Smtp.Network.Port;
host = mailSettings.Smtp.Network.Host;
password = mailSettings.Smtp.Network.Password;
username = mailSettings.Smtp.Network.UserName;
}
Which makes the question clear and easily readable. Its very much confusing to check your code and your problem statement inside your code block.
Thanks !
|
|
|
|
|
Hi, i have reformated my question, seems clear now.
|
|
|
|
|
hi iam having fields int the table
branchid nvarchar(50) primary key,
branchname nvarchar(50),
city nvarchar(50),
area nvarchar(50),
phoneno nvarchar(25),
mobileno nvarchar(25),
photo image (16)
how to store the image in sql server using asp.net with c# and how to display and delete, update from gridview
|
|
|
|
|
look at this
http://www.codeproject.com/KB/database/Store_images_in_SQL_Serve.aspxVuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
There are tow ways to stroe the images.
One way,save the image in local hard disk and save the path of the image in database.
else, Save the image in byte array format in database but this makes the database heavy.
Have a loook to this LinkCheers!!
Brij
|
|
|
|
|
|
it really helps me to get an idea of storing the image into database.thanks fo code project team.
|
|
|
|
|
Please take a look at following link. This is a small useful blog
which describe that how to insert image in database using c#.
http://www.mindstick.com/Blog/184/Save%20image%20in%20SqlServer%20using%20C
This might be useful for you.
Thanks.
|
|
|
|
|
Hi,
In our site I am trying to integrate the CITI Bank payment gateway .For canceling a payment we need to send the post request from merchant site to payment gateway site .For this I am using the web request method , I am posting the parameters to the payment gateway server using the web request but not getting the web response , it is giving the error as The remote server returned an error: (500) Internal Server Error . I am not understanding whether the problem is with the web request or I am not sending the request properly to the gateway . Can anyone please let me know is there any other way to post the request from server to server other than web request method .
Thanks in advance
|
|
|
|
|
vnr wrote: The remote server returned an error: (500) Internal Server Error
If you are sending web request as per their code functionality then its not your error.Sometimes if you are not sending all the parameters which the gateway needs then this error may occur..!
Sometimes the http request waits for particular time to get the response from the server and if it did not get any response this error may occur..!
Here is the sample method for authorize .net for gateway hope it helps..!
private string CreditCardCheck()
{
String strPost = "x_login=" + loginID + "&x_tran_key=" + trans_Key ;
StreamWriter myWriter = null;
string url ="https://secure.authorize.net/gateway/transact.dll";
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
objRequest.Method = "POST";
objRequest.ContentLength = strPost.Length;
objRequest.ContentType = "application/x-www-form-urlencoded";
try
{
myWriter = new StreamWriter(objRequest.GetRequestStream());
myWriter.Write(strPost);
}
catch (Exception ex)
{
logger.Error(ex.Message);
}
finally
{
myWriter.Close();
}
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
using (StreamReader sr =
new StreamReader(objResponse.GetResponseStream()))
{
result = sr.ReadToEnd();
string[] responsedetails = result.Split('|');
TrasactionId = responsedetails[6].ToString();
sr.Close();
}
if (result.ToLower().Contains("invalid") || result.ToLower().Contains("inactive"))
{
return "CreditCardis notvalid";
}
return TrasactionId ;
}
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
I have an application in which,
The aspx Page is dicided in to two[Left pane & Right Pane]
In Left pane the Function[say to calculate 2 nmbrs,CALCULATE Button]
On Clicking the CALCULATE Button the function calls the java script..and the result should be shown in the Right pane,I mean the page has to be refreshed and the rsult should be shown in the same page..
Please help on this!!!!!!!!!
|
|
|
|
|
This is Fairly simple. What is your challenge here ? What have you tried so far ? Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
wt this link refers to? is thr any coding provided for this problem i too have the same problem
|
|
|
|
|
So write a function in javascript which reads the two numbers from the controls,calculate the sum and assign to the control in right pane.
And call this function at onClick event of Button.Cheers!!
Brij
|
|
|
|
|
what shuld we do if it is a large text?
|
|
|
|
|
i mean i my case i have to show a big paragraph thn shld i also write a funct n call?
|
|
|
|
|
Its upto your requirement.If it is to be done at client side then no issues, you can apply the same way Cheers!!
Brij
|
|
|
|
|
u plz help me how to do in asp.net is it possible to do?
|
|
|
|
|
Post your code with your specific requirement,I'll surely help if I could Cheers!!
Brij
|
|
|
|
|
You can use AJAX Update Panel for the same.
1. In left panel Put all the control inside UpdatePanel1 ( Say UpdatePanel1) and lets do what ever you want to do.
2. In right Panel Put the result control inside another updatepanel (Say Updatepanel2 ) , Set the UpdatePanel2's Properties "UpdateMode="Conditional" .
3. In Left panel, when you are writing the code for result, write UpdatePanel2.Update()
That's all.
Please let me know if you need any more help.
Thanks !
Abhijit
|
|
|
|
|
can any one help me in getting the data by clicking any particular button the respective data should be appeared in a frame.
|
|
|
|