
Net hi friends Any one send frequently asked Important questions in C# .Net, ADO .Net, Asp .Net and Sql Server. . . . . . . . tx in Advance. . . . . . Hi, Find this. . (B)What is an IL? (B in short? (I) Can you explain what DCOM is? (B) How do we create DCOM object in VB6? (A) How to implement DTC in .NET? (A) How many types of Transactions are there in COM + .NET? (A) How do you do object pooling in .NET? (A) What are types of compatibility in VB6? (A)What is equivalent of a thread? (A) What is use of Interlocked class ? (A) What is a monitor object? (A) What are wait handles? (A) What is ManualResetEvent and AutoResetEvent? (A) What is Reader is an application domain? (B) What is .NET Remoting? (B) Which class does the remote object has to inherit? (I) what are two different types of remote object creation mode in .NET ? (A) Describe in detail Basic of SAO architecture of Remoting? (A or precreated objects in Remoting? (A) What are the ways in which client can create object on server in CAO model? (A) Are CAO stateful in nature? (A) To create objects
gridview how to edit and delet record in gridview using asp.net For Edit , Update and Delete in GridView You have to Implement following Events of GridView DataSet(); da.Fill(ds); GridView2.DataSource = ds; GridView2.DataBind(); } Code to delete protected void GridView2_RowDeleting(object sender, GridViewDeleteEventArgs e) { string strEmpId = GridView1.Rows[e.RowIndex].Cells[1].Text; / / FOR GETTING ENPID 1; Response.Write("<script> alert('Record Deleted')< / script> "); getdata(); } Code to edit protected void GridView2_RowEditing(object sender, GridViewEditEventArgs e) { GridView2.EditIndex = e.NewEditIndex; getdata(); } Code to Cancel protected void GridView2_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e) { GridView2.EditIndex = -1; getdata(); } Code to Update protected void GridView2_RowUpdating(object sender, GridViewUpdateEventArgs e) { string strEmpId = GridView1.Rows[e.RowIndex].Cells[1].Text; / / FOR GETTING ENPID TemplateField > < asp:BoundField DataField = "Id" ShowHeader = "True" / > < asp:TemplateField HeaderText = "Name" SortExpression = "Name" > < EditItemTemplate > < asp:TextBox ID = "TextBox1" runat = "server" Text = ' <% # Bind("Name") %> ' > < / asp:TextBox > < / EditItemTemplate > < ItemTemplate > < asp:Label ID = "Label2" runat = "server" Text = ' <% # Bind("Name") %> ' > < / asp:Label > < / ItemTemplate > < FooterTemplate
msgMail.BodyFormat = MailFormat.Html; string strBody = "<html> <body> <b> Hello World< / b> " + " <font color = \ "red \ "> ASP.NET< / font> < / body> < / html> " ; msgMail.Body = strBody; SmtpMail.Send(msgMail); Response.Write( "Email Sent" ); refer http aspx Search in the forum here, there are lot of post regarding sending mail in asp.net go through this links http: / / www.eggheadcafe.com / community / aspnet / 7 / 10065297 / send-email.aspx String deliveryNotify, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) at _Default.Button1_Click(Object sender, EventArgs e) in d: \ krunal \ jQuery \ Default.aspx.cs:line 47 i have replace is wrong. here is the complete code to send Email with Gmail SMTP Server from ASP.Net To send email using gmail SMTP server you will require a valid gmail userid and com" / > < add key = "FROMPWD" value = "password" / > < / appSettings > Hope this will help you Sending emails in ASP.Net is very simpler The classes required to send an email are contained in the
controls, but you should be able to apply this to you situation. private void Page_Load(object sender, System.EventArgs e) { / / Load the ServiceRequestListControl for new Service requests Session["goBack"] = "ServiceRequestManagement.aspx"; Session["StatusRange"] = "New"; loadControl(0); } #region Web Form Designer generated code override protected void OnInit(EventArgs e) { / / / / CODEGEN: This call is required by the ASP.NET Web Form Designer. / / InitializeComponent(); base.OnInit(e); } / / / <summary> / / / Required method for Designer support - do not Tabs.GetTab(tabID).ContentPane.Children.Add(uc); } / / Set display properties of control private void grid_InitializeLayout(object sender, Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e) { / / Set visable columns e.Layout.Bands[0].Columns[0 0].Columns[6].Width = Unit.Percentage(10); } / / Create hyperlink to another page private void grid_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { e.Row.Cells[1].Value = "<a href = 'ServiceRequestDetail.aspx Row.Cells[0].Value +"&Mode = CM'> " + e.Row.Cells[1].Value + "< / a> "; } private void UltraWebTab1_TabClick(object sender, Infragistics.WebUI.UltraWebTab.WebTabEvent e) { if(e.Tab.Text = = "New") { Session["StatusRange"] = "New"; / / loadControl
Forms 5. Posted Forms 6. Passing Headers 7. Scraping & Passing Cookies 8. Parse the response object by using Regular expression 9. Parse the response object by using String Method’s 1. Introduction Before sharing the knowledge on screen scraping, I important things that cookies can be used for than can cause trouble when scraping is session variables. Once again you will see that Client is much simpler than the Request method abcd.com") as HttpWebRequest; / / set the cookie value webRequest.CookieContainer = cookies; } 8. Parse the response object by using Regular expression Here I am not taking about regular expression. Before using this Firing up RegEx So, with that in mind, we'll fire up the regular expression object, REGEX, and parse out the Hip section quite painlessly. If you're not a fan StreamReader oSR = null; / / Here's the work horse of what we're doing, the WebRequest object / / fetches the URL WebRequest objRequest = WebRequest.Create("http: / / abcd.com"); / / The WebResponse object gets the Request's response (the HTML) WebResponse objResponse = objRequest.GetResponse(); / / Now dump the contents of our HTML in the Response object to a / / Stream reader oSR = new StreamReader(objResponse.GetResponseStream()); / / And dump the StreamReader into a