|
ya i have done in the same way just i have right clicked the added one style sheet and i have changed the back color and some properties and changed in that cssclass property to that style sheet name it will not be changed
|
|
|
|
|
Hi,
You probably might have missed the Style attribute, check the below code:
/*
.Style1 { FONT: 700 12pt verdana; COLOR: orange }
<asp:label id="Label1" style="Z-INDEX: 102; LEFT: 336px; POSITION: absolute; TOP: 160px" runat="server"
="" cssclass="Style1">Label
*/
P.s. this is just a fragment of code and you need to write this in .aspx page.
Hope this help.
Thanks
Sameer
|
|
|
|
|
first you create stylesheet for a web page.
simply, drag and drop stylesheet under page section
in asp.net's all controls has class or cssClass attribut. which stylesheets class you want to use you write their name under class or cssClass.
|
|
|
|
|
If you are using thems. Create a default.css in your themes folder. You can set all your style information there.
|
|
|
|
|
Note vs2007 is horrible for css. - it is highly inefficient. & master pages/themes just don't cut it for high end css... Instead, design/create your page in Dreamweaver or other web design tool & do your vb/c# coding in vs2007.
Then, you can link to an external css file as follows:
This is much more efficient in terms of bandwidth.
|
|
|
|
|
Hello,
it is possible to add UserControls in Code behind?
Yours sincerely Benny
|
|
|
|
|
|
Yes, just instantiate a control object and add it to a placeholder on your page.
|
|
|
|
|
|
i want to know can we impliment javascript code in ASP.net as we use in ASP
if yes then please suggest me how to inmplment it.
TX.
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.
|
|
|
|
|
Hi,
Yes you can surely do that. You need to add a client side script block in .aspx page and then you can write a javascript code block (functions..etc) there.
Hope this helps.
Thanks.
Sameer
|
|
|
|
|
please specify if there is any example code of that
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.
|
|
|
|
|
|
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
|
|
|
|