Search
Thursday, August 28, 2008
Q: Why are the menus appearing behind Silverlight objects?
Q: Why are the menus appearing behind Silverlight objects?
A: Silverlight objects, just as with all kinds of plugins, are rendered in a special way by the browsers (a method known as "windowed"), making them the topmost objects in a page. At this moment there's no way to display any kind of HTML element (tables, images, paragraphs, etc..) above plugins.
Fortunately, Microsoft has a solution to allow the Silverlight object to be rendered without using the windowed mode allowing HTML elements to displayed above it:
To allow DHTML objects appear over a Silverlight object under Windows you will need to instantiate the object passing the isWindowless attribute and setting it to true.
Please refer to Microsoft's web site for more detailed information:
http://msdn2.microsoft.com/en-us/library/bb412380.aspx
code:
add parameter:
< param name="windowless" value="true" />
Tuesday, August 26, 2008
C#: Popup a window from ASPX
C#: Popup a window from ASPX
public static void popUpWindow(System.Web.UI.Page page, string url)
{
string js = "";
page.RegisterClientScriptBlock("PopUpWindow", js);
}
Monday, August 25, 2008
How to send a mail from the ASP.NET web form
How to send a mail from the ASP.NET web form.
In .NET 2.0 we have SmtpClient class that allows applications to send e-mail by using the Simple Mail Transfer Protocol (SMTP).
Namespace: System.Net.Mail
Example
protected void BtnSubmit_Click(object sender, EventArgs e)
{
if(!validateFields())
return;
SmtpClient smtpClient = new SmtpClient(host, port);
smtpClient.Credentials = new NetworkCredential(user, password);
MailAddress from = new MailAddress(EmailBox.Text, NameBox.Text);
MailAddress to = new MailAddress(to_mail);
MailMessage message = new MailMessage(from, to);
message.Subject = string.Format(subject_template, NameBox.Text, PhoneBox.Text);
message.Body = QuestionBox.Text;
try
{
smtpClient.Send(message);
Response.Redirect(redirect_success,true);
}
catch(Exception ex)
{
ErrorMessage = ex.Message;
Response.Redirect(redirect_error, true);
}
}
Sunday, June 15, 2008
Tuesday, May 6, 2008
Monday, May 5, 2008
how to retrieve combobox selectedvalue
problem:
combobox.selectedvalue is always returning null
solution:
comboBox.Items[comboBox.SelectedIndex]
Monday, April 21, 2008
Subscribe to:
Posts (Atom)
