.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links


Posted By:      Posted Date: October 05, 2010    Points: 0   Category :Windows Application
give me codes for seach and next button

View Complete Post

More Related Resource Links

Writing codes using three tier architecture.


Hello all.

I am a beginner in c#.I heard that writing program with three tier architecture are easy and maintainable.

I just wanted to know with a small example on how to write three tier architecture programs.

Thanks :-)

Converting C# codes with "Delegate function" to VB.Net

Can someone help me converting this code to VB.Net?/// <summary> /// Returns the binary data of the image in the specifed format. /// </summary> /// <param name="format">The format of the bitmap image specified as "gif", "jpg", "png", "bmp", "jxr" or "tiff".</param> public byte[] ToByteArray(string format) { //if image not altered return orig data if (_data != null) return _data; //placed in a thread set to STA to overcome 0xC0000005 thrown in encoder.Save if (!String.IsNullOrEmpty(Copyright)) { byte[] data = null; System.Threading.Thread worker = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(delegate (object obj) { BitmapEncoder encoder = GetEncoder(format); try { BitmapMetadata meta = new BitmapMetadata(format); meta.Copyright = Copyright; encoder.Frames.Insert(0, BitmapFrame.Create(_source, null, meta, null)); //using insert because we're getting error about IList not containing Add method using (MemoryStream memoryStream = new MemoryStream()) { encoder.Save(memoryStream);

Converting C# codes with "Delegate function" to VB.Net

Can someone help me converting this C sharp code to VB.Net? I tried to use several converters on google, none of them worked. /// <summary>     /// Returns the binary data of the image in the specifed format.     /// </summary>     /// <param name="format">The format of the bitmap image specified as "gif", "jpg", "png", "bmp", "jxr" or "tiff".</param>     public byte[] ToByteArray(string format)     {         //if image not altered return orig data         if (_data != null)             return _data;         //placed in a thread set to STA to overcome 0xC0000005 thrown in encoder.Save         if (!String.IsNullOrEmpty(Copyright))         {             byte[] data = null;             System.Threading.Thread worker = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(delegate (object obj) {                 BitmapEncoder encoder = GetEncoder(format);                 try &

display codes (asp or html) on web page

hello.....i am wishing to display asp or html codes on my web page. actually i am working on article project and article includes codes too. still i am using <iframe> but not looking soo good.i am also wishing to dispaly codes in a way that can be expand or collapsed using (+) sing, as you also know. or tell me any alternative to accomplish. thanks in advance

save codes error in form view tool

hi i use this code in form view(at INSERT button)  for save data into SQL serverInsertCommand="INSERT INTO Debtor (AccNo, CompanyName, Desc2, RegisterNo, Address1, Address2, Address3, Address4, PostCode, AreaCode, Phone1, Phone2, Fax1, Fax2, NatureOfBusiness, WebURL, EmailAddress, DeliverAddr1, DeliverAddr2, DeliverAddr3, DeliverAddr4, DeliverPostcode, Attention, SalesAgent, DebtorType, DisplayTerm, CreditLimit, CurrencyCode, UDF_Shipvia, UDF_freigh, UDF_SourceIn, UDF_ProductEnq)VALUES ( @AccNo, @CompanyName, @Desc2, @RegisterNo, @Address1, @Address2, @Address3, @Address4, @PostCode, @AreaCode, @Phone1, @Phone2, @Fax1, @Fax2, @NatureOfBusiness, @WebURL, @EmailAddress, @DeliverAddr1, @DeliverAddr2, @DeliverAddr3, @DeliverAddr4, @DeliverPostcode, @Attention, @SalesAgent, @DebtorType, @DisplayTerm, @CreditLimit, @CurrencyCode, @UDF_Shipvia, @UDF_freigh, @UDF_SourceIn, @UDF_ProductEnq)"> it's show error at:-        Must declare the scalar variable "@AccNo".if i run the application without add (AccNo,....)VALUES(@AccNo) into above codes it's working good..AccNo is into drop down list control..

Do I republish form template with codes everytime when I made changes to the template?


My form template has C# codes. I went through the process to publish it and link the generated content template type to my form lib pre-created.

So my question is Do I have to go over this process (publish, upload, activate it, link...) after I made any changes to the form or the codes?

If so, would be too much work!?


Getting VP.NET code to respond to SQL Return values and Error Codes


I have SQL stored procedures that will return values depending on the outcome of its execution. I have the following code at the end of each of my Stored Procedures:

RETURN @siReturnValue

It would be great to be able to use this Return value after running the Stored Procedures from my VB.NET code. I have included an example of how I am running SQL Stored Procedures below:

    Public Function SearchKeyword(ByVal SearchString As String) As Data.DataTable
        Dim AerialConnection = New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("aerialConnectionString").ConnectionString)
        Dim MediaArchive As New Data.DataTable
        Dim reader As SqlDataReader
            Dim SelectMediaArchiveCommand = New SqlCommand("EXEC spSearch @keywords", AerialConnection)
            SelectMediaArchiveCommand.Parameters.AddWithValue("keywords", SearchString)
            reader = SelectMediaArchiveCommand.ExecuteReader()
        Catch e As Exception
        End Try
        Return MediaArchive
    End Function

How can I code this to respond to different Return values, or even error cod

Infopath 2010 Viewing source codes?? (Urgent!)


Hi everyone,

This will be my first post on this site!!

I am a ASP.NET developer normally using VS 2010 for web application development.

but this time my boss wants me to help another developer who develops and maintains Sharepoint 2010 site and applications.

She uses Infopath 2010 for sharepoint forms developement, but needed my help for custom code writing for proper displaying.

So my boss bought me Infopath 2010 today (I couldn't use VS2010, could not find any related Infopath forms)

and I am trying to use it- But got a problem!!!


Question: There is a button on the form and I clicked button event handler for custom codes.

I wrote custom db connection strings and sql statements and it works, but could not get any source codes for Textbox ID, Dropdown ID

on the form where I can bind my selected information. Where can I find these information? I could not even find any configuration files also,

so please help me with kindness.

I really appreciate your helps, 


-Wook Tae Jung (Mister Car Wash Inc)


SccStatus codes?



am trying to create an application that uses the existing MSSCCI plugins out there.

what are the scc file status codes in ms-scc api  ?

SSRS Format Codes

Where can I find a list of all the format codes, complete with their definitions?

Error in web service codes when accessing a list


Hi all

I've been getting error when i programatically try to access a list. below is my code from a web service:

public IDEASBase(SPWeb web)
      this._spWebPassedByParameter = true;
      this._web = web;
      SPList list = this._web.Lists[this._listName.ToString()];
      this._item = list.Items.Add();

According to the stack trace, the error occurs at SPList list = this._web.Lists[this._listName.ToString()];

Stack trace:

System.Threading.ThreadAbortException: Thread was being aborted.
  at System.Threading.Thread.AbortInternal()
  at System.Threading.Thread.Abort(Object stateInfo)
  at System.Web.HttpResponse.End()
  at Microsoft.SharePoint.Utilities.SPUtilityInternal.SendResponse(HttpResponse response, Int32 code, String strBody)
  at Microsoft.SharePoint.Utilities.SPUtilityInternal.Send401(HttpResponse response)
  at Microsoft.SharePoint.Utilities.SPUtility.HandleAccessDenied(Exception ex)
  at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex)
  at Microsoft.SharePoint.Library.SPRequest.GetListsWithCallback(String bstrUrl, Guid foreignWebId, String bstrListInternalName, Int32 dwBaseType, Int32 dwBaseTypeAlt, Int32 dwServerTemplate, UInt32 dwGetListFlags, UInt32 dwListFilterFlags, Boolean bPrefetchMetaData, Boolean bSecurityTrimmed, Boolean bG

compare 2 html codes


 hi all,

i have read some website content using HTTPWebRequesst and HTTPWebResponse and stored into the sql database

now i bind those recrods to the gridview. after that i click one button that time i'm reading the same site and compare the text with with the gridview web_page content,  like below

if (string.Compare(hdnWebData.Value.ToString(), hdnWebCnt.Value.ToString().ToUpper()) == 0)

but it says both are not equal(actually before few seconds only i have added the data). i set breakpoint and see the data of gridview, there begining of the content i can see some \n\r\n\t (in lot of places i can see this) like this but it is not in the another dat

How to type Alt codes (like ? ???) in a textbox?



How to type Alt codes (like ? ?♦♣) in a textbox? I want to make a text editor for myself and i use it much but i hate that annoying square.

I hope you can help me.

I can't speek very good English, I am from Belgium. (that very little land in Europe xD)

jQuery and ASP VBSCRIPT codes


 Hi, I am wondering how is it possible to add html codes into an asp vbscript page. Because currently I just copy and paste the codes into the asp page, and the jQUery(html codes) do not work. And I also want to incorporate a Grid view into the pop up box that I am developing with the jQuery codes. Any codes are needed to merge these two together? And also the Grid View reads data from a database. Thanks alot for any help.

How do I add functionality to get distance between cities/zip codes into my asp.net website?


Im looking for the functionality seen in most commercial websites like google maps to get approximate distance between cities and zip codes. Im guessing these sites are using huge databases with all this information already in them. It would be interesting to learn how to create this functionality myself but Im sure that would require a great deal of time. So Im looking for a package where someone has already done the work(an API) that would allow me to enter two different zip codes or maybe two different city,state combinations and take actions from there.

Thanks for your help.

My vb codes doesn't run logically


I set a break point to look at my codes process and I see a weird situation:

Dim intDDL As Int32

intDDL = ddl.SelectedIndex (intDDL gets 2 in here)

If intDDL > 1 Then


ElseIf intDDL < 1 Then




End If


I see intDDL is 2 and My app goes in to codes1 and codes3, it should just go to codes1.

And I remove  intDDL = ddl.SelectedIndex  from codes, then intDDL will not be assigned any value, but I still see intDDL = 2 in there and step to codes1 and codes3. Application should pop up an error message say null reference!

Does anyone know what could I do?

Thank you.

Having problem with this codes any help...


Hi guys.... am developing an eleave management system, and the codes below is for creating inserting new members in the the database.... but if i click save, its does save the details into the database and it does not show any error as well.... Please i need help.

Imports System.Data
Imports System.Data.SqlClient
Partial Class Admin_AdCreateuser
    Inherits System.Web.UI.Page
    Dim connection As New SqlConnection(ConfigurationManager.ConnectionStrings("newuserConnectionString1").ConnectionString)
    Private Function checkEx
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend