Search Results

Search found 4472 results on 179 pages for 'vb'.

Page 76/179 | < Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >

  • .NET and P2P - writing a P2P messenger

    - by brovar
    Hi there, Does anyone have any advice how to write such app? Or maybe knows some nice tutorial? I would like to use System.Net.PeerToPeer namespace, but everything I can find about it is MSDN which I can't read without getting mad. Or maybe using "old-school" TCP/IP would more efficient? I will appreciate every piece of advice. Every sample code I will shower with gold ;) And please, don't send me back to Google for I have searched for a long time for sth useful - maybe inaccurately but time is running out and I really need some help.

    Read the article

  • cancel update in datacontext = LInq

    - by Garcia Julien
    Hi, I would like to know if its possible to discard changes of only one record of only one table in datacontext. I use databind to bind my controls on a form. I modify one record at a time. after the modification, the user have to hit save button to validate. But he can hit cancel. I would like that the cancel button discard all the changes that the user has done. Is it possible? Ju

    Read the article

  • Problem with asp.net function syntax (not returning values correctly)

    - by Phil
    I have an active directory search function: Function GetAdInfo(ByVal ADDN As String, ByVal ADCommonName As String, ByVal ADGivenName As String, ByVal ADStaffNum As String, ByVal ADEmail As String, ByVal ADDescription As String, ByVal ADTelephone As String, ByVal ADOffice As String, ByVal ADEmployeeID As String) As String Dim netBIOSname As String = Me.Request.LogonUserIdentity.Name Dim sAMAccountName As String = netBIOSname.Substring(netBIOSname.LastIndexOf("\"c) + 1) Dim defaultNamingContext As String Using rootDSE As DirectoryServices.DirectoryEntry = New DirectoryServices.DirectoryEntry("LDAP://RootDSE") defaultNamingContext = rootDSE.Properties("defaultNamingContext").Value.ToString() End Using Using searchRoot As DirectoryServices.DirectoryEntry = _ New DirectoryServices.DirectoryEntry("LDAP://" + defaultNamingContext, _ "kingkong", "kingkong", DirectoryServices.AuthenticationTypes.Secure) Using ds As DirectoryServices.DirectorySearcher = New DirectoryServices.DirectorySearcher(searchRoot) ds.Filter = String.Format("(&(objectClass=user)(objectCategory=person)(sAMAccountName={0}))", sAMAccountName) Dim sr As DirectoryServices.SearchResult = ds.FindOne() 'If sr.Properties("displayName").Count = 0 Then whatever = string.empty '' (how to check nulls when required) ' End If ADDN = (sr.Properties("displayName")(0).ToString()) ADCommonName = (sr.Properties("cn")(0).ToString()) ADGivenName = (sr.Properties("givenname")(0).ToString()) ADStaffNum = (sr.Properties("sn")(0).ToString()) ADEmail = (sr.Properties("mail")(0).ToString()) ADDescription = (sr.Properties("description")(0).ToString()) ADTelephone = (sr.Properties("telephonenumber")(0).ToString()) ADOffice = (sr.Properties("physicalDeliveryOfficeName")(0).ToString()) ' ADEmployeeID = (sr.Properties("employeeID")(0).ToString()) End Using End Using Return ADDN Return ADCommonName Return ADGivenName Return ADStaffNum Return ADEmail Return ADDescription Return ADTelephone Return ADOffice ' Return ADEmployeeID 'have commented out employee id as i dont have one so it is throwing null errors. ' im not ready to put labels on the frontend or catch this info yet End Function The function appears to work, as when I put a breakpoint at the end, the variables such as ADDN do have the correct values. Then I call the function in my page_load like this: GetAdInfo(ADDN, ADCommonName, ADGivenName, ADStaffnum, ADEmail, ADDescription, ADTelephone, ADOffice, ADEmployeeID) Then I try to response.write out one of the vars to test like this: Response.Write(ADDN) But the value is empty. Please can someone tell me what I am doing wrong. Thanks

    Read the article

  • Code that Worked with MultiView fails with Wizard ASP.NET

    - by davemackey
    I originally created a process that occurred by transitioning between views in a multiview and it worked fine. Now, I've moved this same code into a ASP.NET Wizard and it keeps throwing an error at the second step. The error is: Method 'System.Object AndObject(System.Object, System.Object)' has no supported translation to SQL. Any ideas why this would occur when moving the code into the wizard? I'm sure its something stupid, but I've checked over the code 3-4 times now and it appears identical operationally. Here is the code: ' Make sure we have the LDAP portion of the .NET Framework available. Imports System.DirectoryServices ' Allows us to interface with LDAP. Imports System.Data.Linq.SqlClient ' Allows us to use LINQ SQL Methods. Partial Public Class buildit Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ' ******* Grab the LDAP info. for current user. Dim ID As FormsIdentity = DirectCast(User.Identity, FormsIdentity) Dim ticket As FormsAuthenticationTicket = ID.Ticket Dim adDirectory As New DirectoryEntry("LDAP://OU=[info],DC=[info],DC=[info],DC=[info]") ' We need to strip off @email.address from the ticket name, so we'll use substring to grab the first ' five characters. Dim adTicketID As String = ticket.Name.Substring(0, 5) Dim adEmployeeID As String adEmployeeID = adDirectory.Children.Find("CN=" & adTicketID).Properties("employeeID").Value ' ******* Lets make sure they have signed the housing contract and the community covenant. Dim dbContractSigs As New pcRoomOccupantsDataContext Dim pcContractSigs = From p In dbContractSigs.webContractSigs _ Where p.people_id = adEmployeeID _ Select p.res_contract, p.comm_life If pcContractSigs.Count.Equals(0) Then Response.Redirect("signcontract.aspx") Else Dim cs As String = pcContractSigs.First.res_contract.ToString Dim cos As String = pcContractSigs.First.comm_life.ToString If cs = "Y" And cos = "Y" Then ' We don't need to do anything. ' We use the else statement b/c there are multiple conditions that could occur besides "N" ' that would cause us to redirect to the signature page, whereas there is only one valid response - "Y". Else ' Redirect the individual to our contracts page. Response.Redirect("signcontract.aspx") End If End If ' ******* Now lets find out what gender that individual is. Dim dbIndividual As New pcPeopleDataContext Dim pcIndividual = From p In dbIndividual.PEOPLEs _ Join d In dbIndividual.DEMOGRAPHICs On p.PEOPLE_CODE_ID Equals d.PEOPLE_CODE_ID _ Where p.PEOPLE_ID = adEmployeeID _ Select p, d ' Make a session variable that will carry with the user throughout the session delineating gender. Session("sgender") = pcIndividual.First.d.GENDER.ToString ' Debug Code. ' Put a stop at end sub to get these values. ' Response.Write(adEmployeeID) End Sub Sub LinqDataSource1_Selecting(ByVal sender As Object, ByVal e As LinqDataSourceSelectEventArgs) ' Lets get a list of the dorms that are available for user's gender. Dim pcDorms As New pcDormsDataContext Dim selectedDorms = (From sd In pcDorms.PBU_WEB_DORMs _ Where IIf(Session("sgender").ToString = "M", sd.description = "Male", sd.description = "Female") _ Select sd.dorm_building).Distinct() e.Result = selectedDorms End Sub Public Sub Button_ItemCommand(ByVal Sender As Object, ByVal e As RepeaterCommandEventArgs) ' ******** Lets pass on the results of our query in LinqDataSource1_Selecting. Session("sdorm") = RTrim(e.CommandName) ' ******** Debug code. ' Response.Write(sDorm) End Sub Sub LinqDataSource2_Selecting(ByVal sender As Object, ByVal e As LinqDataSourceSelectEventArgs) ' ******** Get a list of rooms available in the dorm for user's gender. Dim pcDorms As New pcDormsDataContext Dim selectedDorm = (From sd In pcDorms.PBU_WEB_DORMs _ Where IIf(Session("sgender").ToString = "M", sd.description = "Male", sd.description = "Female") _ And sd.dorm_building = CStr(Session("sdorm")) _ Select sd.dorm_room) e.Result = selectedDorm End Sub Public Sub Button2_ItemCommand(ByVal Sender As Object, ByVal e As RepeaterCommandEventArgs) ' ******** Lets pass on the results of our query in LinqDataSource2_Selecting. Session("sroom") = RTrim(e.CommandName) End Sub Sub LinqDataSource3_Selecting(ByVal sender As Object, ByVal e As LinqDataSourceSelectEventArgs) ' ******** Grabs the individuals currently listed as residing in this room and displays them. Note the use of SqlMethods.Like ' for dorm_building, this is due to legacy issues where dorms sometimes have leading or trailing blank spaces. We could have ' also used Trim. Dim pcOccupants As New pcRoomOccupantsDataContext Dim roomOccupants = (From ro In pcOccupants.webResidents _ Where SqlMethods.Like(ro.dorm_building, "%" & CStr(Session("sdorm")) & "%") _ And ro.dorm_room = CStr(Session("sroom")) _ Select ro.person_name) e.Result = roomOccupants ' ******** Debug code. 'Response.Write(CStr(Session("sdorm"))) 'Response.Write(CStr(Session("sroom"))) End Sub Protected Sub Button4_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button4.Click ' ******** Reserve the room for a student. End Sub End Class

    Read the article

  • ASP.Net Webservice - Constructors with Parameters

    - by Ben
    Hi, I'm fairly new to WebService developement and have just set up my own webservice (ASP.Net 3.5, Visual Studio 2008 .asmx file). I can not find a way of setting up my webservice to take parameters on the constructor. If i create a constructor that takes parameters, it is not then shown when i hook up to the webservice from my application (it only shows a parameterless constructor). Am i missing something blatently obvious, or is this not possible (and why not)? Thanks.

    Read the article

  • MS SQL SELECT stored procedure according to combobox.selectedvalue

    - by Jay
    Hello, In order to fill a datagridview according to the selectedvalue of a combobox I've tried creating a stored procedure. However, as I'm not 100% sure what I'm doing it, depending on the WHERE statement at the end of my stored procedure, either returns everything within the table or nothing at all. This is what's in my class: Public Function GetAankoopDetails(ByRef DisplayMember As String, ByRef ValueMember As String) As DataTable DisplayMember = "AankoopDetailsID" ValueMember = "AankoopDetailsID" If DS.Tables.Count > 0 Then DS.Tables.Remove(DT) End If DT = DAC.ExecuteDataTable(My.Resources.S_AankoopDetails, _Result, _ DAC.Parameter(Const_AankoopID, AankoopID), _ DAC.Parameter("@ReturnValue", 0)) DS.Tables.Add(DT) Return DT End Function Public Function GetAankoopDetails() As DataTable If DS.Tables.Count > 0 Then DS.Tables.Remove(DT) End If DT = DAC.ExecuteDataTable(My.Resources.S_AankoopDetails, _Result, _ DAC.Parameter(Const_AankoopID, AankoopID), _ DAC.Parameter("@ReturnValue", 0)) DS.Tables.Add(DT) Return DT End Function This is the function in the code behind the form I've written in order to fill the datagridview: Private Sub GridAankoopDetails_Fill() Try Me.Cursor = Cursors.WaitCursor dgvAankoopDetails.DataSource = Nothing _clsAankoopDetails.AankoopDetailsID = cboKeuze.SelectedValue dgvAankoopDetails.DataSource = _clsAankoopDetails.GetAankoopDetails Catch ex As Exception MessageBox.Show("An error occurred while trying to fill the data grid: " & ex.Message, "Oops!", MessageBoxButtons.OK) Finally Me.Cursor = Cursors.Default End Try End Sub And finally, this is my stored procedure: (do note that I'm not sure what I'm doing here) USE [Budget] GO /****** Object: StoredProcedure [dbo].[S_AankoopDetails] Script Date: 04/12/2010 03:10:52 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[S_AankoopDetails] ( @AankoopID int, @ReturnValue int output ) AS declare @Value int set @Value =@@rowcount if @Value = 0 begin SELECT dbo.tblAankoopDetails.AankoopDetailsID, dbo.tblAankoopDetails.AankoopID, dbo.tblAankoopDetails.ArtikelID, dbo.tblAankoopDetails.Aantal, dbo.tblAankoopDetails.Prijs, dbo.tblAankoopDetails.Korting, dbo.tblAankoopDetails.SoortKorting, dbo.tblAankoopDetails.UitgavenDeelGroepID FROM dbo.tblAankoopDetails INNER JOIN dbo.tblAankoop ON dbo.tblAankoopDetails.AankoopID = dbo.tblAankoop.AankoopID INNER JOIN dbo.tblArtikel ON dbo.tblAankoopDetails.ArtikelID = dbo.tblArtikel.ArtikelID INNER JOIN dbo.tblUitgavenDeelGroep ON dbo.tblAankoopDetails.UitgavenDeelGroepID = dbo.tblUitgavenDeelGroep.UitgavenDeelGroepID WHERE dbo.tblAankoopDetails.Deleted = 0 and dbo.tblAankoopDetails.AankoopID = @AankoopID ORDER BY AankoopID if @@rowcount >0 begin set @ReturnValue=999 end else begin set @ReturnValue=997 end end if @Value >0 begin --Dit wil zeggen dat ik een gebruiker wil ingeven die reeds bestaat. (998) set @ReturnValue=998 end Does anyone know what I'm need to do to resolve this? Kind regards, Jay

    Read the article

  • LINQ to SQL select distinct from multiple colums

    - by Morron
    Hi, I'm using LINQ to SQL to select some columns from one table. I want to get rid of the duplicate result also. Dim customer = (From cus In db.Customers Select cus.CustomerId, cus.CustomerName).Distinct Result: 1 David 2 James 1 David 3 Smith 2 James 5 Joe Wanted result: 1 David 2 James 3 Smith 5 Joe Can anyone show me how to get the wanted result? Thanks.

    Read the article

  • Images next to the checkbox in CheckedListBox

    - by comii
    Hi! I have CheckedListBox, now i want to put image from the ImageList next to the every checkbox. I try to do that with this: CheckedListBox1.Items.Add(ImageList1.Images(0)) But with this I get only checkbox with text System.Drawing.Bitmap! What I am doing wrong, I and how i can put image next to the checkbox? Thanks!

    Read the article

  • Sql or VB for Access

    - by vijay
    I Have a table in Access as below SI Number Time 1.14172E+20 13:30:35 1244066650 18:58:48 1244066650 19:03:12 1244066650 19:05:50 01724656007_dsl 22:15:20 01724656007_dsl 22:18:00 01724656007_dsl 22:24:28 1141530407 10:27:49 1141530407 10:29:13 And require output in the same table is SI Number Time Diff 1.14172E+20 13:30:35 1244066650 18:58:48 1244066650 19:03:12 0:04:24 1244066650 19:05:50 0:02:38 01724656007_dsl 22:15:20 01724656007_dsl 22:18:00 0:02:40 01724656007_dsl 22:24:28 0:06:28 1141530407 10:27:49 1141530407 10:29:13 0:01:24 I require as if 1st record in SI Number column is equals to 2nd record than record 2 of time column -record 1 of time column in Diff column record 2 record 1 will remain blank Urgent help required Vijay

    Read the article

  • HttpWebRequest does has empty response requesting a search from Bing

    - by Jarrod Maxwell
    I have the following code that sends a HttpWebRequest to Bing. When I request the url below though it returns what appears to be an empty response when it should be returning a list of results. var response = string.Empty; var httpWebRequest = WebRequest.Create("http://www.bing.com/search?q=stackoverflow&count=100") as HttpWebRequest; httpWebRequest.Method = WebRequestMethods.Http.Get; httpWebRequest.Headers.Add("Accept-Language", "en-US"); httpWebRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Win32)"; httpWebRequest.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip,deflate"); using (var httpWebResponse = httpWebRequest.GetResponse() as HttpWebResponse) { Stream stream = null; using (stream = httpWebResponse.GetResponseStream()) { if (httpWebResponse.ContentEncoding.ToLower().Contains("gzip")) stream = new GZipStream(stream, CompressionMode.Decompress); else if (httpWebResponse.ContentEncoding.ToLower().Contains("deflate")) stream = new DeflateStream(stream, CompressionMode.Decompress); var streamReader = new StreamReader(stream, Encoding.UTF8); response = streamReader.ReadToEnd(); } } Its pretty standard code for requesting and receiving a web page. Any ideas why the response is empty? Thanks in advance. EDIT I left off a query string parameter in the url. I also had &count=100 which I have now corrected. It seems to work for values of 50 and below but returns nothing when larger. This works ok when in the browser, but not for this web request. It makes me think the issue is that the response is large and HttpWebResponse is not handling that for me the way I have it set up. Just a guess though.

    Read the article

  • HTMLAgilitypack getting <P> and <STRONG> text

    - by StealthRT
    Hey all i am looking for a way to get this HTML code: <DIV class=channel_row><SPAN class=channel> <DIV class=logo><IMG src='/images/channel_logos/WGNAMER.png'></DIV> <P><STRONG>2</STRONG><BR>WGNAMER </P></SPAN> using the HtmlAgilityPack. I have been trying this: With channel info!Logo = .SelectSingleNode(".//img").Attributes("src").Value info!Channel = .SelectSingleNode(".//span[@class='channel']").ChildNodes(1).ChildNodes(0).InnerText info!Station = .SelectSingleNode(".//span[@class='channel']").ChildNodes(1).ChildNodes(2).InnerText End With I can get the Logo but it comes up with a blank string for the Channel and for the Station it says Index was out of range. Must be non-negative and less than the size of the collection. I've tried all types of combinations: info!Station = .SelectSingleNode(".//span[@class='channel']").ChildNodes(1).ChildNodes(1).InnerText info!Station = .SelectSingleNode(".//span[@class='channel']").ChildNodes(1).ChildNodes(3).InnerText info!Station = .SelectSingleNode(".//span[@class='channel']").ChildNodes(0).ChildNodes(1).InnerText info!Station = .SelectSingleNode(".//span[@class='channel']").ChildNodes(0).ChildNodes(2).InnerText info!Station = .SelectSingleNode(".//span[@class='channel']").ChildNodes(0).ChildNodes(3).InnerText What do i need to do in order to correct this?

    Read the article

  • difference between signtool and sn or al for assembly signing

    - by sveerap
    Hi, I see tool like SN which generates private/public key pair for signing an assembly. and using AL tool we can assign a strong name to an assembly And we have also Sign tool which is used for signing the assembly (probably for using with certificates exclusively?). What is the exact difference between the two?. Is it sign tool have to be used when working with certificates and can it we acheive it SN?. or are they totally different.? Please help.

    Read the article

  • Postback event not firing on FIRST button click..

    - by ClarkeyBoy
    Hi, I have a form which accepts two arguments. The first one is mode - this is either view, new or edit. If it is new then the second argument is type - this is either range, collection or design. When set to new, and the type is valid, a new instance of that type is created and the data from the form is added to it. The item (range, collection or design) then validates the data. If any of the data is invalid then it throws an error, and this error is displayed at the top of the form telling the user why it is invalid. A variable, _Databind, is set to false so that it does not change the data input by the user (in the form fields). The button used to submit the button is called btnSave, and is created in the html source. The click event is wired up in the form Protected Sub Blah(sender, e) Handles btnSave.Click. Strangely, whenever I edit an item that already exists the form submits fine the first time - the click event is fired. However when in "new" mode I have to click the button twice to fire the event. It also blanks all the form fields out on first click. I have even put a Response.Write("Hello World") line at the start of the click event - this is not being output on first click when adding a new item either. It is on first load when the mode is set to edit however. Does anyone have any ideas as to what is causing it to behave this way? Thanks in advance for any help. Regards, Richard

    Read the article

  • Problem sending mail with simple .net application. Server refusal error.

    - by Fatih
    I have a very simple .net application for testing SMTP on .net. But i am receiving this weird error. "System.Net.Mail.SmtpException: Failure sending mail. --- System.Net.WebException: Unable to connect to the remote server --- System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it" SMTP server is remote and doesn't need any kind of authentication so i don't need credentials. But i can send mails from this computer with outlook using same smtp server and same smtp settings without any problem. Any ideas? It will be appreciated so much. Imports System.Net.Mail Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim smtp As New SmtpClient smtp.Host = "10.241.128.220" smtp.Port = 25 smtp.Send("[email protected]", "[email protected]", "test", "test") End Sub

    Read the article

  • Multi-threading mechanisms to run some lengthy operations from winforms code and communication with

    - by tmarouda
    What do I want to achieve: I want to perform some time consuming operations from my MDI winforms application (C# - .NET). An MDI child form may create the thread with the operation, which may take long time (from 0.1 seconds, to even half hour) to complete. In the meantime I want the UI to respond to user actions, including manipulation of data in some other MDI child form. When the operation completes, the thread should notify the MDI child that the calculations are done, so that the MDI child can perform the post-processing. How can I achieve this: Should I use explicit threading (i.e., create explicit threads), thread pools? Or simply just propose your solution. Should I create foreground or background threads? And how does the thread communicates with the GUI, according the solution you propose? If you know of a working example that handles a similar situation, please make a note.

    Read the article

  • What join in Linq i have to use to do what i want?

    - by Garcia Julien
    Hi, I have two dataset from different server. I have result like that (if image doesn't work my data) The problem is at last, i've got only the result from the first table like that And i would like to have all the result for different job type like that asset job jan feb mar ... 5000 acc 10 11 12 5000 over 10 11 12 The problem is not solve with a right join because it's the same problem Could you help me? Thank Ju

    Read the article

  • ajax tabcontainer with button postback problem

    - by yousof
    I have a dropdownlist in my web page and two command buttons and a tabcontainer. The tabcontainer does not appear after the load of page according to my code. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not IsPostBack Then TabContainer1.Visible = False If CtvAct.GetRecords("Fill_RequestTypeTb") = True Then ReqTypeCmbo.DataSource = CtvAct.MainDataset.Tables("tbOLRequestType").DefaultView ReqTypeCmbo.DataTextField = "RequestTypeName" ReqTypeCmbo.DataValueField = "RequestTypeId" ReqTypeCmbo.DataBind() Dim itm As New ListItem itm.Text = "-- ??? ??? ????? --" itm.Value = "-1" itm.Selected = True ReqTypeCmbo.Items.Insert(0, itm) ReqTypeCmbo.SelectedIndex = 0 End If End If End Sub Protected Sub PrntCmd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles PrntCmd.Click TextBox6.Text = "gggg" End Sub Protected Sub ReqTypeCmbo_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ReqTypeCmbo.SelectedIndexChanged If ReqTypeCmbo.SelectedItem.Text = "????" Then TabContainer1.Visible = True TabContainer1.ActiveTabIndex = 0 OwnerDataPnl.Enabled = True AttornyDataPnl.Enabled = True BaseDataPnl.Enabled = True RenwDataPnl.Visible = False NewOwnerDataPnl0.Visible = False AddActivtyPnl.Visible = False SubstitPnl.Visible = False FinishLicePnl.Visible = False CancelActivityPnl.Visible = False LocTransPnl.Visible = False ' Panel1.Visible = False '?????? ?????? ??????? ???????? REstOfficeAddrTxt.Enabled = True REstOffIdeIssuedPlaceTxt.Enabled = True REstOffIdentityNameTxt.Enabled = True REstOffIdentityNumberTxt.Enabled = True REstOffIdentityStartDateTxt.Enabled = True REstOffMobileTxt.Enabled = True REstOffNameTxt.Enabled = True REstOffPhoneTxt.Enabled = True OwnerShipNumberTxt.Enabled = True OwnerShipDateTxt.Enabled = True OwnerShipIssuedPlaceTxt.Enabled = True SerailTxt.Enabled = True RequestIdTxt.Enabled = True RequestDateTxt.Enabled = True RenwDataPnl.Visible = True '''' If CtvAct.GetRecords("Fill_NationalityTb") = True Then OwnrNationCmbo.DataSource = CtvAct.MainDataset.Tables("tbOLNationality").DefaultView OwnrNationCmbo.DataTextField = "NationName" OwnrNationCmbo.DataValueField = "NationId" OwnrNationCmbo.DataBind() Dim itm As New ListItem itm.Text = "-- ??? ??????? --" itm.Value = "-1" itm.Selected = True OwnrNationCmbo.Items.Insert(0, itm) OwnrNationCmbo.SelectedIndex = 0 End If If CtvAct.GetRecords("Fill_ActivityTb") = True Then AcivityCombo.DataSource = CtvAct.MainDataset.Tables("tbOLActivity").DefaultView AcivityCombo.DataTextField = "ActivityName" AcivityCombo.DataValueField = "ActivityId" AcivityCombo.DataBind() AcivityCombo.SelectedIndex = -1 Dim itm As New ListItem itm.Text = "-- ??? ?????? --" itm.Value = "-1" itm.Selected = True AcivityCombo.Items.Insert(0, itm) AcivityCombo.SelectedIndex = 0 End If 'If CtvAct.GetRecords("Fill_ActivityTb") = True Then ' DropDownList2.DataSource = CtvAct.MainDataset.Tables("tbOLActivity").DefaultView ' DropDownList2.DataTextField = "ActivityName" ' DropDownList2.DataValueField = "ActivityId" ' DropDownList2.DataBind() 'AcivityCombo.Visible = True ' LbCon.Text = CtvAct.Prt 'End If AttronayNationCmbo.SelectedIndex = -1 If CtvAct.GetRecords("Fill_NationalityTb") = True Then AttronayNationCmbo.DataSource = CtvAct.MainDataset.Tables("tbOLNationality").DefaultView AttronayNationCmbo.DataTextField = "NationName" AttronayNationCmbo.DataValueField = "NationId" AttronayNationCmbo.DataBind() Dim itm As New ListItem itm.Text = "-- ??? ??????? --" itm.Value = "-1" itm.Selected = True AttronayNationCmbo.Items.Insert(0, itm) AttronayNationCmbo.SelectedIndex = 0 ' LbCon.Text = CtvAct.Prt End If If CtvAct.GetRecords("Fill_LocationTb") = True Then LocationIdCmbo.DataSource = CtvAct.MainDataset.Tables("tbOLLocation").DefaultView LocationIdCmbo.DataTextField = "LocationName" LocationIdCmbo.DataValueField = "LocationId" LocationIdCmbo.DataBind() Dim itm As New ListItem itm.Text = "-- ??? ?????? --" itm.Value = "-1" itm.Selected = True LocationIdCmbo.Items.Insert(0, itm) LocationIdCmbo.SelectedIndex = 0 ' LbCon.Text = CtvAct.Prt End If '''''''''''''''''''''''''''''''' con = New SqlConnection(CtvAct.Connection_String()) CmdActivty = con.CreateCommand CmdActivty.CommandText = "SELECT ActivityId FROM tbOLStoreActivty" DaActivity.SelectCommand = CmdActivty DaActivity.Fill(DsActivity, "tbOLStoreActivty") ActivityGV.DataSource = DaActivity ActivityGV.DataMember = "tbOLStoreActivty" AcivityCombo.DataSource = ds.Tables(0) AcivityCombo.DataTextField = "ename" AcivityCombo.DataValueField = "eid" AcivityCombo.DataBind() ''''''''''''''''''''''''''''' LbCon.Text = CtvAct.Prt ElseIf ReqTypeCmbo.SelectedItem.Text = "?????" Then TabContainer1.Visible = True TabContainer1.ActiveTabIndex = 1 OwnerDataPnl.Enabled = False AttornyDataPnl.Enabled = False BaseDataPnl.Enabled = True AddActivtyPnl.Visible = False SubstitPnl.Visible = False FinishLicePnl.Visible = False RenwDataPnl.Visible = True AddActivtyPnl.Visible = False NewOwnerDataPnl0.Visible = False CancelActivityPnl.Visible = False LocTransPnl.Visible = False '?????? ?????? ??????? ???????? REstOfficeAddrTxt.Enabled = False REstOffIdeIssuedPlaceTxt.Enabled = False REstOffIdentityNameTxt.Enabled = False REstOffIdentityNumberTxt.Enabled = False REstOffIdentityStartDateTxt.Enabled = False REstOffMobileTxt.Enabled = False REstOffNameTxt.Enabled = False REstOffPhoneTxt.Enabled = False OwnerShipNumberTxt.Enabled = False OwnerShipDateTxt.Enabled = False OwnerShipIssuedPlaceTxt.Enabled = False SerailTxt.Enabled = True RequestIdTxt.Enabled = True RequestDateTxt.Enabled = True ''''''''' ElseIf ReqTypeCmbo.SelectedItem.Text = "??? ?????" Then TabContainer1.Visible = True TabContainer1.ActiveTabIndex = 1 OwnerDataPnl.Enabled = False AttornyDataPnl.Enabled = False BaseDataPnl.Enabled = False RenwDataPnl.Visible = False NewOwnerDataPnl0.Visible = True AddActivtyPnl.Visible = False SubstitPnl.Visible = False FinishLicePnl.Visible = False CancelActivityPnl.Visible = False LocTransPnl.Visible = False ElseIf ReqTypeCmbo.SelectedItem.Text = "????? ????" Then TabContainer1.Visible = True TabContainer1.ActiveTabIndex = 1 OwnerDataPnl.Enabled = False AttornyDataPnl.Enabled = False BaseDataPnl.Enabled = False RenwDataPnl.Visible = False NewOwnerDataPnl0.Visible = False AddActivtyPnl.Visible = False SubstitPnl.Visible = False FinishLicePnl.Visible = False CancelActivityPnl.Visible = True LocTransPnl.Visible = False ElseIf ReqTypeCmbo.SelectedItem.Text = "????? ????" Then TabContainer1.Visible = True TabContainer1.ActiveTabIndex = 1 OwnerDataPnl.Enabled = False AttornyDataPnl.Enabled = False BaseDataPnl.Enabled = False RenwDataPnl.Visible = False NewOwnerDataPnl0.Visible = False AddActivtyPnl.Visible = False SubstitPnl.Visible = False FinishLicePnl.Visible = True LocTransPnl.Visible = False ElseIf ReqTypeCmbo.SelectedItem.Text = "??? ???? / ????" Then TabContainer1.Visible = True TabContainer1.ActiveTabIndex = 1 OwnerDataPnl.Enabled = False AttornyDataPnl.Enabled = False BaseDataPnl.Enabled = False RenwDataPnl.Visible = False NewOwnerDataPnl0.Visible = False AddActivtyPnl.Visible = False SubstitPnl.Visible = True FinishLicePnl.Visible = False LocTransPnl.Visible = False ElseIf ReqTypeCmbo.SelectedItem.Text = "??? ????" Then TabContainer1.Visible = True TabContainer1.ActiveTabIndex = 0 OwnerDataPnl.Enabled = True AttornyDataPnl.Enabled = True BaseDataPnl.Enabled = True RenwDataPnl.Visible = False NewOwnerDataPnl0.Visible = False AddActivtyPnl.Visible = False SubstitPnl.Visible = False FinishLicePnl.Visible = False CancelActivityPnl.Visible = False LocTransPnl.Visible = True End If End Sub If I press any button after page load the button work very selecting any item from dropdownlist make the tabcontainer appear but after the tabcontainer appear, the buttons does not work (postback) how can I solve these problems

    Read the article

  • Gridview inside a ModalPopUpExtender causes ModalPopUpExtender to close

    - by harold-sota
    I have a gridview inside a ModalPopUpExtender, the grid view have the button add delete and edit when i clic one of the button of the gridview the popup is closed. I wont to close the popup when the close button is clicked. This is the asp.net part: < cc1: ModalPopupExtender ID="NamePopup" runat="server" PopupControlID="OptionPanel" TargetControlID="btnD" BackgroundCssClass="mpBg" DropShadow="true" OkControlID="btnSavePopup" CancelControlID="btnPostCancel" < / cc1:ModalPopupExtender Any ideas??

    Read the article

  • operator not defined for System.Data.SqlClient.SqlConnection and System.Data.SqlClient.SqlConnection

    - by Beta033
    i hope i'm just doing something wrong here. Ideally i'm trying to open the connection, open a transaction execute a ton of prebuilt sqlstatements (with parameters) against this connection then close the connection. ideally all in the same batch. It's easy enough to wrap this all in a for loop, however i'd like to use the forEach function of the list generic to set the connection as it'll probably be faster than my implementation of calling List.Item(i) in the loop but i get some strange errors. Dim sqlStatements As List(Of SqlCommand) = New List(Of SqlCommand) Dim conn As SqlClient.SqlConnection = New SqlConnection("...") sqlStatements.Item(0).Connection = conn 'Works sqlStatements.ForEach(Function(ByRef cmd As SqlCommand) cmd.Connection = conn) 'ERROR: Operator '=' is not defined for types 'System.Data.SqlClient.SqlConnection' 'and 'System.Data.SqlClient.SqlConnection What does this error really mean?

    Read the article

  • How do I subscribe to a MSMQ queue but only "peek" the message in .Net?

    - by lemkepf
    We have a MSMQ Queue setup that receives messages and is processed by an application. We'd like to have another process subscribe to the Queue and just read the message and log it's contents. I have this in place already, the problem is it's constantly peeking the queue. CPU on the server when this is running is around 40%. The mqsvc.exe runs at 30% and this app runs at 10%. I'd rather have something that just waits for a message to come in, get's notified of it, and then logs it without constantly pooling the server. Dim lastid As String Dim objQueue As MessageQueue Dim strQueueName As String Public Sub Main() objQueue = New MessageQueue(strQueueName, QueueAccessMode.SendAndReceive) Dim propertyFilter As New MessagePropertyFilter propertyFilter.ArrivedTime = True propertyFilter.Body = True propertyFilter.Id = True propertyFilter.LookupId = True objQueue.MessageReadPropertyFilter = propertyFilter objQueue.Formatter = New ActiveXMessageFormatter AddHandler objQueue.PeekCompleted, AddressOf MessageFound objQueue.BeginPeek() end main Public Sub MessageFound(ByVal s As Object, ByVal args As PeekCompletedEventArgs) Dim oQueue As MessageQueue Dim oMessage As Message ' Retrieve the queue from which the message originated oQueue = CType(s, MessageQueue) oMessage = oQueue.EndPeek(args.AsyncResult) If oMessage.LookupId <> lastid Then ' Process the message here lastid = oMessage.LookupId ' let's write it out log.write(oMessage) End If objQueue.BeginPeek() End Sub

    Read the article

  • A checklist for fixing .NET applications to SQL Server timeout problems and improve execution time

    - by avgbody
    A checklist for improving execution time between .NET code and SQL Server. Anything from the basic to weird solutions is appreciated. Code: Change default timeout in command and connection by avgbody. Use stored procedure calls instead of inline sql statement by avgbody. Look for blocking/locking using Activity monitor by Jay Shepherd. SQL Server: Watch out for parameter sniffing in stored procedures by AlexCuse. Beware of dynamically growing the database by Martin Clarke. Use Profiler to find any queries/stored procedures taking longer then 100 milliseconds by BradO. Increase transaction timeout by avgbody. Convert dynamic stored procedures into static ones by avgbody. Check how busy the server is by Jay Shepherd.

    Read the article

  • Filtering DBNull With LINQ

    - by Steven
    Why does the following query raise the error below for a row with a NULL value for barrel when I explicitly filter out those rows in the Where clause? Dim query = From row As dbDataSet.conformalRow In dbDataSet.Tables("conformal") _ Where Not IsDBNull(row.Cal) AndAlso tiCal_drop.Text = row.Cal _ AndAlso Not IsDBNull(row.Tran) AndAlso tiTrans_drop.Text = row.Tran _ AndAlso Not IsDBNull(row.barrel) _ Select row.barrel If query.Count() > 0 Then tiBarrel_txt.Text = query(0) Run-time exception thrown : System.Data.StrongTypingException - The value for column 'barrel' in table 'conformal' is DBNull. How should my query / condition be rewritten to work as I intended?

    Read the article

  • ASP.Net application timeout

    - by ClarkeyBoy
    Hi, I have an application I have just deployed which, for complicated reasons, stores all the data from the database in a module the first time any data from the specific table is required (i.e. when a customer requests to view a product for the first time, all the product data is stored in the ProductManager class (of which an instance is stored in a shared property of the SiteContent class, making the ProductManager easily accessible from any page). Now forget that you are probably now glaring at me for using this approach.. I am sure it has its inefficiencies but I have only been studying .Net for a year or so now so I am still learning. One thing I have noticed is that I can go on the site once, then revisit it 5 minutes later and it will load all the data into the ProductManager class again. It seems this is a .Net application timeout thing - since the session timeout is set to 30 minutes and, when I am logged in on the administration frontend, it logs me out after 5 minutes (ish). Does anyone have any idea how to change this? Is there any way I can change this in the code without having to contact the hosting company? If not in the code is there any way to change this in the web.config? Thanks in advance. Regards, Richard

    Read the article

  • Interface Java Applet using Visual Basic

    - by Louise
    Can you point me to a reference on accessing data in a Java applet using Visual Basic? I need to do some research on whether or not it is feasible for the project I am working on, but it has been difficult to find any information. Thanks.

    Read the article

< Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >