R4R
Right Place For Right Person TM
R4R ASP.Net FAQS ASP.Net Subjective Questions and Answers

 


Totel:147 Click: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

ASP.NET Interview Questions And Answers

Page 1

Questions 1 How to Configure SMTP in asp .NET?

Answer
This example specifies SMTP parameters to send e-mail using a remote SMTP server and user that are importent. This program shows configuration process- <system.net> <mailSettings> <smtp deliveryMethod="Network|PickupDirectoryFromIis|SpecifiedPickupDirec> <network defaultCredentials="true|false" from="r4r@fco.in" host="smtphost" port="26" password="password" userName="user"/> <specifiedPickupDirectory pickupDirectoryLocation="c:\pickupDirectory"/> </smtp> </mailSettings> </system.net>

Questions 2 Print Hello World message using SharePoint in Asp.Net 2.0?

Answer
using System; using System.Collections.Generic; using System.Text; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using Microsoft.SharePoint.WebPartPages; namespace LoisAndClark.WPLibrary { public class MYWP : WebPart { protected override void CreateChildControls() { Content obj = new Content(); string str1 = obj.MyContent<string>("Hello World!"); this.Controls.Add(new System.Web.UI.LiteralControl(str1)); } } } generic method shows that SharePoint site is running on .NET Framework 2.0, and the code of the generic method seems like this: public string MyContent<MyType>(MyType arg) { return arg.ToString(); }

Questions 3 How to  create a SharePoint web part using File upload control.give example?

Answer
using System; using System.Collections.Generic; using System.Text; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using Microsoft.SharePoint.WebPartPages; namespace LoisAndClark.WPLibrary { public class MYWP : WebPart { FileUpload objFileUpload = new FileUpload(); protected override void CreateChildControls() { this.Controls.Add(new System.Web.UI.LiteralControl ("Select a file to upload:")); this.Controls.Add(objFileUpload); Button btnUpload = new Button(); btnUpload.Text = "Save File"; this.Load += new System.EventHandler(btnUpload_Click); this.Controls.Add(btnUpload); } private void btnUpload_Click(object sender, EventArgs e) { string strSavePath = @"C:\temp\"; if (objFileUpload.HasFile) { string strFileName = objFileUpload.FileName; strSavePath += strFileName; objFileUpload.SaveAs(strSavePath); } else { //otherwise let the message show file was not uploaded. } } } }

Questions 4 
What is  BulletedList Control in Share Point. Give an example?

Answer
Bullet style allow u choose the style of the element that precedes the item.here u can choose numbers, squares, or circles.here child items can be rendered as plain text, hyperlinks, or buttons. This example uses a custom image that requires to be placed in a virtual directory on the server. using System; using System.Collections.Generic; using System.Text; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using Microsoft.SharePoint.WebPartPages; namespace LoisAndClark.WPLibrary { public class MyWP : WebPart { protected override void CreateChildControls { BulletedList objBullist = new BulletedList(); objBullist.BulletStyle = BulletStyle.CustomImage; objBullist.BulletImageUrl = @"/_layouts/images/rajesh.gif"; objBullist.Items.Add("First"); objBullist.Items.Add("Seciond"); objBullist.Items.Add("Third"); objBullist.Items.Add("Fourth"); this.Controls.Add(objBullist); } } }

Questions 5 DescribeWizard server control with example in Share Point?

Answer
This control enables you to build a sequence of steps that are displayed to the end users side. It is alos used either display or gather information in small steps in system. using System; using System.Collections.Generic; using System.Text; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using Microsoft.SharePoint.WebPartPages; namespace LoisAndClark.WPLibrary { public class MyWP : WebPart { protected override void CreateChildControls() { Wizard objWizard = new Wizard(); objWizard.HeaderText = "Wizard Header"; for (int i = 1; i <= 6; i++) { WizardStepBase objStep = new WizardStep(); objStep.ID = "Step" + i; objStep.Title = "Step " + i; TextBox objText = new TextBox(); objText.ID = "Text" + i; objText.Text = "Value for step " + i; objStep.Controls.Add(objText); objWizard.WizardSteps.Add(objStep); } this.Controls.Add(objWizard); } } }


Goto Page:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Share |

ASP.NET Objective Questions And Answers

ASP.NET Objective Questions And Answers

ASP.NET Interview Questions And Answers

ASP.NET Interview Questions And Answers


R4R,ASP.NET Objective, ASP.NET Subjective, ASP.NET Interview Questions And Answers,ASP.NET,ASP.NET Interview,ASP.NET Questions ,ASP.NET Answers

New Updates

R4R
R4R
R4R
R4R
R4R
R4R
R4R
R4R