|
|
thank for sample code happy coading
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
You can also inject javascript from your server side code. For example:
private void Closer_Click(object sender, EventArgs e)
{
Page.RegisterStartupScript("closerScript",
"<script language='JavaScript'>window.close();</script>"
}
This code will close the current window when the Closer button is clicked.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
thanks for responce
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
You can also add script to the Attributes of a server control. For instance,
cboSurveyType is a drop down
billingMethod is the js I want to invoke via the onChange event...
Important: place in a "if (!this.IsPostBack)" block
PS: toBad you can't add it via prop page... very shortsighted of ms...
protected void Page_Load(object sender, EventArgs e)
{
try
{
if (!this.IsPostBack)
{
cboSurveyType.Attributes.Add("onChange", "billingMethod();");
}
}
finally { }
}
|
|
|
|
|
Sorry with my english skill -*- .
I need to control appliance to turn on/off via website.So i wrote ASP.net website and make my computer to be server.When users have submit command in website those command will write to text file.In addition, i have VC#.net window application,it uses to control appliance via serial port by use the text file which is from ASP.net website to turn on/off appliance.
Question?
1. How to apply this to real use?
2. I have to had real server and make website?
3. What's your advice
Please help .
thank
Aonz
|
|
|
|
|
hello great guys
i m making a site thru which i hav to send emails.
for this i have done some coding as follows:-
Private Sub Sendmail()
Try
Dim Mail As New MailMessage
If TxtEmailFrom.Text = "" Then
lblError.Text = "Please,Enter Sender's Email id."
Exit Sub
Else
Mail.From = TxtEmailFrom.Text
End If
If TxtEmailTo.Text = "" Then
lblError.Text = "Please,Enter Receiver's Email id."
Exit Sub
Else
Mail.To = TxtEmailTo.Text
End If
If txtCC.Text <> "" Then
Mail.Cc = txtCC.Text
End If
If txtBCC.Text <> "" Then
Mail.Bcc = txtBCC.Text
End If
Mail.BodyFormat = MailFormat.Text
Mail.Priority = MailPriority.Normal
If Me.TxtEmailSub.Text <> "" Then
Mail.Subject = TxtEmailSub.Text
End If
If Me.TxtEmailBody.Text <> "" Then
Mail.Body = TxtEmailBody.Text
End If
Dim strfilename, attach1 As String
If Not (File1.PostedFile Is Nothing) Then
Dim attFile As HttpPostedFile = File1.PostedFile
Dim attachFileLength As Integer = attFile.ContentLength
If attachFileLength > 0 Then
strfilename = Path.GetFileName(File1.PostedFile.FileName)
File1.PostedFile.SaveAs(Server.MapPath(strfilename))
Dim attach As MailAttachment = New MailAttachment(Server.MapPath(strfilename))
Mail.Attachments.Add(attach)
attach1 = strfilename
End If
End If
If Not (attach1 Is Nothing) Then
File.Delete(Server.MapPath(attach1))
End If
SmtpMail.SmtpServer = "IP of my SMTP server "
SmtpMail.Send(Mail)
Response.Write("Your mail has been sent successfully.")
Catch ex As Exception
lblError.Text = ex.Message
End Try
End Sub
this piece of code is working fine on my pc where site is being developed.
but problem arises when i m going to deploy it.
error "invalid email attachment."
this is obvious because it executes on the server.
give me some idea so that i can attach the file from clien's PC.
as in various sites like yahoo,gmail,rediffmail etc.
i hope u ppl have understood my problem.
and if any confusion comes
then plz tell me.
regards
Ajay
|
|
|
|
|
Sir,
I have seen your article it is very nice,
I have created a windows control to use it in my web application. That windows
control uses an activeX control DSO Framer control. I made it as an assembly and installed it in to the GAC, but when I tried to display it in the browser nothing is visible. At the place of the control its giving a red mark.
And I am running it in the local intranet only, could you please help me. I am trying to display office doc' in this control. Please help. I would be thankful to you. Please.
Regards,
Aleem.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Which article you are refering to?
Best Regards,
Apurva Kaushal
|
|
|
|
|
This is the article http://www.15seconds.com/issue/030610.htm and some other articles are also there as http://discuss.develop.com/archives/wa.exe?A2=ind0403a&L=dotnet-clr&D=1&T=0&P=6680 and http://forums.microsoft.com/msdn/showpost.aspx?PostId=606367&siteId=1 and
http://msdn.microsoft.com/msdnmag/issues/02/01/UserCtrl/
And for immediate response you can email me at :
aleem_abdul@akebonosoft.com
But please try to help me, Whats the problem with this.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Why are you posting it multiple times? doing it once will also serve the purpose.
and why anybody will mail you the solution for immediate response. here if something is posted then it is for all and others can also take advantage of that.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Am I stopping you to not to advantage, I asked you to help me if you could. Chha !.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Why don't you go through the article again and then come with some specific problem.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Apurva believe me this question is specific only and I have been doing it. It is my patience that I am trying to achieve it. Even my boss got fed up with this. He is saying that "Why dont the people give easy solutions for this kind of things", it is true. Now I dont post it even for many times also, in every step I got hurdles.
Optimisticly I tried to pass every hurdle, I am fed up. Its completely new and rare too. Thank you, for understanding me.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Im not surprised your boss is getting sick of the sound of this problem - I know we all are here at CP.
|
|
|
|
|
please help
how to clear or set the errormessages in validation summary control using javascript...
regards.
There's never a Wronge Time To Do The Right Thing !!
|
|
|
|
|
Hi,
The validation summary has a property "EnableClientScript" which is true by default. This will render javascript and takes care of validation. If you set it to false no client side script is rendered and the control updates itself only on postbacks.
Hope this helps.
Thanks,
Sameer
|
|
|
|
|
hi all,
i have tied to add a rference to my application,
the name of the library is
microsoft excel 11.0 object library
but it is not working , i have got a warnig also.
when i tried to create an object then i have got an error like this
"microsoft.office.interop.excel.application is not defined"
i dont know why i am unable to register taht particualr dll, can anybody help me.
|
|
|
|
|
Hi,
For every com component .NET tries to create a Com Callable Wrapper (CCW) in the form of Interop.xxxx. If it fails to generate CCW you may get a warning / error. The workaround would be to generate an interop assembly from the COM component using TLBIMP.exe <dllname>.
Hope this helps.
Thanks
Sameer
|
|
|
|
|
hi i need to show a message box in asp.net how to do it?
|
|
|
|
|
you can use javascript laert for this purpose.
Best Regards,
Apurva Kaushal
|
|
|
|
|
if you r using visual studio 2005 . add referance of system.windows.form
then use messagebox.show("");
regards
imran khan
|
|
|
|
|
Write the following code in a class file(.vb or .cs) and the from the application call classname.CreateMessageAlert(Me,"Please Login","clientScript")
Public Class ClsMsgBox
Public Shared Sub CreateMessageAlert(ByVal aspxPage As
System.Web.UI.Page, ByVal strMessage As String, ByVal strKey As String)
Dim strScript As String = ""
strScript &= "alert(""" & strMessage & """);"
strScript &= ""
If (Not aspxPage.IsStartupScriptRegistered(strKey)) Then
aspxPage.RegisterStartupScript(strKey, strScript)
End If
End Sub
End Class
Happy Programming!!!
Tonmoy Roy
|
|
|
|
|
hi,
I wanted to know if there is any way of running the internet explorer as the background process. i dont want the internet explorer to be displayed but it should invoke the iexplorer.exe and should show as a running process in the task manager.
If there is any link then plz suggest it to me.
Thanks
Riz
|
|
|
|
|
I don't think so.
Why?
---
Year happy = new Year(2007);
|
|
|
|