Wednesday, May 30, 2007
Devaranegu heltini...., "Mungaaru Male" na naanu 3 saari nodidagalu intha olle remix aitade adondu dialogueu antha andkondirodirli, adra sulivu irlilla nanage. Aadre ,nenne taane idanna nodide kanri...., satttogo astu nagu bandbidtu. Probably, nandu gatti jeeva adakke saaililla, adu secondary.
Idanne blognalli haakona antha haakta idini...., nothing offending plzzzzzzz :)
"Nivu nan kaili keyskondilla antha nange bejarilla kanri. Nim Thika, Nim Thode, Nim Sonta, Nivu baggidaaga nodida aa moley saaku kanri. Adanne rewind maadi maadi jatka hodkondu nan life na thalli bidthini kanri. Adre ondu vishya thilkolri nimma aa nagna deha nenskondu naanu jatka hodkolvastu bere yaaru hodkolalla kanri. Nan thunne murdogli, kithkond kai ge barli, naan satthru jatka hodkolthane irthini kanri!!!! [:D] "
Thursday, May 24, 2007
Feature changes in asp.net 2.0
http://msdn2.microsoft.com/en-us/library/aa479401.aspx
Understanding page inheritance in asp.net 2.0
http://west-wind.com/weblog/posts/3016.aspx
The Code Models of ASP.NEt 2.0 (abt partial classes) http://www.odetocode.com/Articles/406.aspx
Monday, May 21, 2007
Check this......., vvvvvv important concept
http://msdn2.microsoft.com/en-us/library/ms998306.aspx
here is a good sample to pop up a server calendar control rather than use any javascript calendar control
http://www.15seconds.com/issue/040315.htm
if you want to use javascript calendar.. than check out this cool skinned calendar (dhtml) which can be used...
http://www.dynarch.com/projects/calendar/
There is a Calendar control in AJAX tool kit, it is a perfect one.
How Do I: Configure the ASP.NET AJAX Calendar Control?
Execute the below code in page_load event
_System.Text.StringBuilder sbValid = _new _System.Text.StringBuilder();
sbValid.Append("if (typeof(Page_ClientValidate) == 'function') { ");
sbValid.Append("if (Page_ClientValidate() == false) { return false; }} ");
sbValid.Append("this.value = 'Please wait...';");
sbValid.Append("this.disabled = true;");
sbValid.Append("document.all.btnSubmit.disabled = true;");
//GetPostBackEventReference obtains a reference to a client-side script function that causes the server to post back to the page.
sbValid.Append(this.Page.GetPostBackEventReference(this.btnSubmit));
sbValid.Append(";");
_this.btnSubmit.Attributes.Add("onclick", sbValid.ToString());
Where btnSubmit is a simple asp button
I need to read Html source of a Web From at Server -- Copy the whole html source code before actually rendering it
<%@ _Page Language="C#" _AutoEventWireup="true" _CodeFile="RenderPageToHtml.aspx.cs" _Inherits="RenderPageToHtml" _Trace="true" %>
<_head runat="server"> <_title>Untitled Page<_body>
<_form id="form1" _runat="server"> <_div> <_asp:_textbox id="TextBox1" runat="server" height="414px" textmode="MultiLine" width="198px"> <_asp:_button id="Button1" runat="server" text="Button"> <_asp:_linkbutton id="LinkButton1" runat="server">LinkButton 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;public partial class RenderPageToHtml : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { if (Session["text"] != null) { TextBox1.Text = Session["text"].ToString(); } } protected override void Render(HtmlTextWriter writer) { System.IO.MemoryStream mem = new System.IO.MemoryStream(); System.IO.StreamWriter twr = new System.IO.StreamWriter(mem); System.Web.UI.HtmlTextWriter myWriter = new HtmlTextWriter(twr); base.Render(myWriter);
myWriter.Flush(); myWriter.Dispose();
System.IO.StreamReader strmRdr = new System.IO.StreamReader(mem); strmRdr.BaseStream.Position = 0; string pageContent = strmRdr.ReadToEnd(); strmRdr.Dispose(); mem.Dispose(); Session["text"] = pageContent; writer.Write(pageContent); }}
Reference: http://forums.asp.net/t/1112091.aspx
Hi,
To convert excel to XML see:
http://www.codeproject.com/office/excel2xml.asp
To convert CSV to XML see:
http://blogs.msdn.com/kaevans/archive/2003/04/17/5780.aspx
(It is not writed via ASP.NET, but you can refer it.)
To convert excel to csv see:
http://www.devasp.net/net/articles/display/141.html
string Name = _TextBox1.Text;
string Surname = _TextBox2.Text;
SqlDataSource userQuizDataSource = new SqlDataSource(); userQuizDataSource.ConnectionString =
ConfigurationManager.ConnectionStrings["Demo_DBConnection"].ToString(); userQuizDataSource.InsertCommand = "INSERT INTO [Student] ([Name], [Surname]) VALUES (@Name,@Surname)";
userQuizDataSource.InsertParameters.Add("Name", Name); userQuizDataSource.InsertParameters.Add("Surname", Surname); userQuizDataSource.Insert();
http://msmvps.com/blogs/anguslogan/archive/2004/12/22/27223.aspx
Thursday, May 17, 2007
<_columns>
<_asp:templatefield headertext = "Serial Number">
<_itemtemplate>
<_%#container.dataitemindex>
<_/itemtemplate>
<_/asp:templatefield>
<_asp:boundfield datafield = "PK_MASTER_TRANID" headertext = "Transaction ID">
<_asp:templatefield headertext = "Week Details">
<_itemtemplate>
<%#DataBinder.Eval((Container.DataItem),"ENDDA","{0:MM/dd/yyyy}")%><%#_DataBinder.Eval(Container.DataItem, "BEGDA", "{0:MM/dd/yyyy}")%><%#_DataBinder.Eval((Container.DataItem),"ENDDA","{0:MM/dd/yyyy}")%><_%#_databinder._eval(_container._dataitem,> - <_%#_databinder.eval((_container.dataitem),"endda","{0:mm/dd/yyyy}")%>
<_/itemtemplate>
<_/asp:templatefield>
<_asp:templatefield>
<_itemtemplate>
<_asp _commandname ="">
Wednesday, May 16, 2007
1.You can add a Javascript function in your page, as shown below:
_function _doSubmit()
{
if_(event.keyCode==13)
_document.all.xxx.click();
}
2. And then add this : _onkeydown="_doSubmit();" in the onkeydown event of the target TextBox.
3. After that, in your code-behind page, set the cursor back to the TextBox by using the postback method in your PageLoad event. e.g. this.TextBox1.Focus();
Tuesday, May 15, 2007
I came across this code (sorry dont remember the web site) that I have posted in
response to many of the posts related to this type of problem. I thought it would
be easier if I post this code here for others to find.
/// <_summary>
/// Finds a Control recursively. Note finds the first match that exists
///
/// <_param name="ContainerCtl">Should be the lowest container in the heirarchy,
for eg dont choose Master page if you can pick the specific panel
/// <_param name="IdToFind">ID of the control you are looking for
/// <_returns>the control if found else null
_private static Control _FindControlRecursive(Control Root, string Id)
{
if (Root.ID == Id)
return Root;
foreach (Control Ctl in Root.Controls)
{
Control FoundCtl = FindControlRecursive(Ctl, Id);
if (FoundCtl != null)
return FoundCtl;
}
return null;
}
http://www.microsoft.com/technet/technetmag/issues/2006/11/InsideMSCOM/
To enable debugging @ server when there is a event triggered @ client side.ie, if there is break point placed at ne point in the server, once client requests for the page, and break point is reached, we can easily trace and debug the same @ server side.
In server place a break point whereever u wanna debug, and Debug -- >procesess
aspnet_wp.exe
select this and attach (check clr)
More Details: http://support.microsoft.com/kb/893657
Friday, May 11, 2007
Monday, May 07, 2007
XML Documentation helps in displaying the metadata for the dll users, so ne info thats required to be shared with DLL users can be commented here. Check "intMailFormat" parameter, users using this dll shud know wat exactly to be passed.
//----------------Use Full piece of code--------------------------------
/// <_summary>
/// Function overloaded without Attachments
///
/// <_param name="strTo">Receiver Mail ID
/// <_param name="strCC">Carbon Copy Receivers>
/// <_param name="strBCC">Blind Carbon Copy Receivers
/// <_param name="strFrom">Sender Mail ID
/// <_param name="strSubject">Mail Subject
/// <_param name="strBody">Mail Body
/// <_param name="intMailFormat">Mail Format expects 0 for Plain Text and 1 for HTML(HTML is the default)
#region Sending Mail without attachments
public static void sendMail(string strTo, string strCC, string strBCC, string strFrom, string strSubject, string strBody, int intMailFormat)
{
try
{
MailMessage MailMsg = new MailMessage();
MailMsg.From = new MailAddress(strFrom);
MailMsg.To.Add(strTo);
if (strCC.Trim() != "")
{
MailMsg.CC.Add(strCC);
}
if (strBCC.Trim() != "")
{
MailMsg.Bcc.Add(strBCC);
}
MailMsg.Subject = strSubject;
MailMsg.Body = strBody;
if (intMailFormat == 0)
{
MailMsg.IsBodyHtml = false;
}
else
{
MailMsg.IsBodyHtml = true;
}
SmtpClient client = new SmtpClient("localhost");
client.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
client.UseDefaultCredentials = true;
client.Send(MailMsg);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion