This is my technical area for troubleshooting and learning new programming skills and much more. Here, you will find answers on a wide range of technologies such as AI, Machine Learning, OpenAI, Databricks, ASP.NET, C#, Python, Microsoft Access, MySQL, Amazon Web Services, SQL Server, PL/SQL, JD Edwards, SAS, Salesforce, APIs, MVC, and many others. Please feel free to visit and join the discussion!
Monday, June 29, 2009
Friday, June 26, 2009
Quotation in where condition sql-server
Windows 7 Upgrade
Windows 7 will be available on October 22. It includes tons of little refinements—
and a few big ones—many suggested by you. The result? Everyday computing is
faster, simpler, easier.
Order Now Your Upgrade Version Save more then $100.
Windows7 Home Premium Upgrade
Windows7 Professional Upgrade
Thursday, June 25, 2009
Wednesday, June 24, 2009
Twitter asp.net 2.0, C# sample
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><
html xmlns="http://www.w3.org/1999/xhtml" ><
head runat="server"> <title>Untitled Page</title></
head><
body> <form id="form1" runat="server"> <div> <table style="width: 50%" align="center"> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td align="right"> <asp:Label ID="Label2" runat="server" Text="User Id:"></asp:Label></td> <td> <asp:TextBox ID="txtusrid" runat="server" Width="144px"></asp:TextBox> </td> <td> </td> </tr> <tr> <td align="right"> <asp:Label ID="Label3" runat="server" Text="Password:"></asp:Label></td> <td> <asp:TextBox ID="txtpass" runat="server" TextMode="Password"></asp:TextBox></td> <td> </td> </tr> <tr> <td align="right" style="height: 40px"> <asp:Label ID="Label1" runat="server" Text="Messages:"></asp:Label></td> <td style="height: 40px"> <asp:TextBox ID="txtmessage" runat="server" TextMode="MultiLine" Width="259px" Height="99px"></asp:TextBox> </td> <td style="height: 40px"> </td> </tr> <tr> <td style="height: 21px"> </td> <td style="height: 21px"> <asp:Button ID="Button1" runat="server" Text="Submit" OnClick="Button1_Click" /> <asp:Label ID="Label4" runat="server" Width="126px"></asp:Label></td> <td style="height: 21px"> </td> </tr> </table> </div> </form></
body>using
System;using
System.Net;using
System.Web;using
System.IO;public
partial class Default5 : System.Web.UI.Page{
protected void Page_Load(object sender, EventArgs e){
}
public void SubmitUserMsg(string username, string passwd, string txttweet){
string user = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(username + ":" + passwd)); byte[] bytes = System.Text.Encoding.ASCII.GetBytes("status=" + txttweet); HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://twitter.com/statuses/update.xml");request.Method =
"POST"; request.ServicePoint.Expect100Continue = false;request.Headers.Add(
"Authorization", "Basic " + user);request.ContentType =
"application/x-www-form-urlencoded";request.ContentLength = bytes.Length;
Stream reqStream = request.GetRequestStream();reqStream.Write(bytes, 0, bytes.Length);
reqStream.Close();
Label4.Text =
"Message Posted";}
protected void Button1_Click(object sender, EventArgs e){
SubmitUserMsg(txtusrid.Text, txtpass.Text, txtmessage.Text);
}
}
Tuesday, June 23, 2009
Error: Sys.WebForms.PageRequestManagerParserErrorException:
Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
HTML Editor ajax toolkit 3.5 vs 2008 Sample
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><%
@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %><%
@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="HTMLEditor" %><
html xmlns="http://www.w3.org/1999/xhtml"><
head runat="server"> <title>Untitled Page</title></
head><
body> <form id="form1" runat="server"><
div> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <script type="text/javascript"> </script> <asp:UpdatePanel ID="updatePanel1" runat="server"> <ContentTemplate> <HTMLEditor:Editor runat="server" Id="editor" Height="300px" AutoFocus="true" Width="100%" /> <br /> <asp:Button runat="server" Text="Submit content" ID="submit" onclick="submit_Click" /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </ContentTemplate> </asp:UpdatePanel> </div> </form></
body></
html>Monday, June 22, 2009
Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. error
<ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" runat="server" />
Sunday, June 21, 2009
What is Google Wave?
Friday, June 19, 2009
How to generate serial Number in DataList? asp.net
How to generate serial Number in DataList?
<asp:TemplateField HeaderText="SLr.No">
<ItemTemplate>
<asp:Label ID="lbSnNo" runat="Server" Text='<%# Container.ItemIndex + 1 %>' />
</ItemTemplate>
</asp:TemplateField>
How to Define style in code behind C#?
Active desktop recovery problem
Line 65
Char 1
file:///C:/Documents%20and%20Settings/My%20Name/Application%20Data/Microsoft/Internet%20Explorer/Desktop.htt"
Thursday, June 18, 2009
Newsletter sample template using access database , C# and smtp
| Newsletter format using access database , C# and smtp <%@ Page Language="C#" AutoEventWireup="true" CodeFile="nl1.aspx.cs" Inherits="nl1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; " id="maintabl" runat="server"> <tr> <td colspan="1" align="center" > <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Send" /></td> </tr> <tr> <td valign="top"> <asp:Label ID="Label1" runat="server" Text="Label" BackColor="Transparent" Width="100%"></asp:Label><br /> <br /> <br /> </td> </tr> <tr> <td colspan="1" style="height: 20px" align="center" > <asp:Label ID="labmsg" runat="server"></asp:Label></td> </tr> </table> <br /> <br /> <br /> <br /> </div> </form> </body> </html> Code Behind...... using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.OleDb; using System.Web.Mail; public partial class nl1 : System.Web.UI.Page { string dynTable = ""; protected void Page_Load(object sender, EventArgs e) { string connectionString = "provider=Microsoft.Jet.OLEDB.4.0;data source=c:\\xxxx\\database\\MailDB.mdb"; OleDbConnection myOleDbConnection = new OleDbConnection(connectionString); OleDbCommand myOleDbCommand = myOleDbConnection.CreateCommand(); string ProdTy = "M2"; string Strsql = "SELECT top 5 * from DetailURLMisc "; myOleDbCommand.CommandText = Strsql; myOleDbConnection.Open(); OleDbDataReader myOleDbDataReader = myOleDbCommand.ExecuteReader(); myOleDbDataReader.Read(); dynTable = "<table align=\"center\" width=\"95%\" cellspacing=\"0\" cellpadding=\"3\" border=\"1\">"; dynTable += "<tr><td height=\"50px\" style=\"background-color:Blue\" colspan=\"3\">" +"<a href=\"default.aspx\" style=\"text-decoration: none\"><font class=\"X-small\"" +"color=\"gold\" size=\"6\"><font color=\"red\" face=\"Monotype Corsiva\">Header</font></font></a>" + "</td></tr>"; dynTable += "<tr><td height=\"25px\" style=\"background-color:Silver\" colspan=\"3\">Header2</td></tr>"; dynTable += "<tr>"; dynTable += "<td width=\"20%\"> 1</td>"; dynTable += "<td width=\"50%\" valign=\"top\">President Barack Obama's plan to transform the Federal Reserve into a super-regulator ran into skepticism Thursday from lawmakers who worry that the central bank is not the best suited to keep an eye on firms deemed so big and influential that their demise could hurt the economy.</td>"; dynTable += "<td width=\"30%\">"; while (myOleDbDataReader.Read()) { //dynTable += "<td>"+(myOleDbDataReader["TextUrl"].ToString())+"</td>"; dynTable += "<a href=" + myOleDbDataReader["NameUrl"].ToString() + "><img border=0 src=" + (myOleDbDataReader["ImageUrl"].ToString()) + "xxx></img></a>" + "<a href=" + myOleDbDataReader["NameUrl"].ToString() + ">" + (myOleDbDataReader["TextUrl"].ToString()) + "</a><br/>"; } dynTable += "</td></tr>"; dynTable += "<tr><td height=\"25px\" style=\"background-color:Silver\" colspan=\"3\"> Footer</td></tr>"; dynTable += "</table>"; Label1.Text = dynTable.ToString(); } void sndmail() { MailMessage oMessage = new MailMessage(); oMessage.To = "xxxxxx@gmail.com"; oMessage.From = "vvvvv@xxxxxx.net"; System.Text.StringBuilder sb = new System.Text.StringBuilder(); oMessage.Subject = "Great Find"; oMessage.Body = dynTable; oMessage.BodyFormat = MailFormat.Html; //oMessage.Attachments = txtBody.Text; //Response.Write("http://www.visli.com/" + System.IO.Path.GetFileName(Request.Url.ToString())); oMessage.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = 2; oMessage.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserver"] = "mail.xxxxx.net"; oMessage.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"] = "kkkkk@xxxxxx.net"; //oMessage.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"] = "xxxxx"; oMessage.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] = 1; System.Web.Mail.SmtpMail.SmtpServer = "mail.xxxxxx.net";// try { oMessage = oMessage; System.Web.Mail.SmtpMail.Send(oMessage); labmsg.Text = "Message Send"; } catch (Exception Ex) { labmsg.Text = ("Unable to send mail! " + Ex.Message); } } protected void Button1_Click(object sender, EventArgs e) { //Label2.Text = maintabl; sndmail(); } } |