Search Results

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

Page 94/179 | < Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >

  • implement button click in html

    - by vbNewbie
    I have been trying to execute a button event in html page that displays additional content on the web page. I am getting a null reference error when using the getelementbyid and not sure how to change this. Here is the html reference I need to engage: <div class="button" style="float:none;width:180px;margin:20px auto 30px;"><a href="#" id="more" style="width:178px">Show more ?</a></div> </div> and here is my code: Dim wb As New WebBrowser wb.Navigate(fromUrl) While wb.ReadyState <> WebBrowserReadyState.Complete Application.DoEvents() End While Debug.Write(wb.DocumentText) Dim htmlElements As HtmlElementCollection = wb.Document.GetElementsByTagName("<a") If Not wb.Document Is Nothing Then Try If wb.DocumentText.Contains("more") Then If wb.Document.GetElementById("more").GetAttribute("href") Then wb.Document.GetElementById("more").InvokeMember("#") End If End If Catch ex As Exception MessageBox.Show(ex.Message.ToString) End Try End If I appreciate any ideas.

    Read the article

  • Getting attachments from a mail account with .NET

    - by MarceloRamires
    I'd like a free library for .NET to get attachments from an account (such as gMail, or others) via imap4 (not necessarely), and save them in a folder. Ideally it would allow me to get a list of them, and download only some given ones (filtering by extension, name, and/or size) and be free. I've already done this with a trial version of EAGetMail, but for the purpose of what i'm trying to attempt buying the unlimited version of this library isn't quite suitable (i didn't know that this functionality itself was one among the ones with limited time). ---[edit - Higuchi]--- I'm using the following code: Dim cl As New Pop3Client() cl.UserName = "[email protected]" cl.Password = "mypassword" cl.ServerName = "pop.gmail.com" cl.AuthenticateMode = Pop3AuthenticateMode.Pop cl.Ssl = False cl.Authenticate() //takes a while, but passes even if there's a wrong password Dim mg As Pop3Message = cl.GetMessage(1) //gives me an exception: Message = "Pop3 connection is closed" As commented, I am having some issues while trying to connect and get the first e-mail. any help ?

    Read the article

  • How to allow users to select their own grouping for a .NET TreeView control

    - by Chapso
    I am using a treeview to display projects, tasks, time entries, and the people who are working on a project. I would like to allow the user to define a custom grouping (ie. Project->Task->Time Entries or Project->Date (of time entry)->Task->TimeEntry). The relevant groups would be Project, Task, Time Entry, and Person, with some metadata from them. I want to have some modular way to allow a user to specify how they would like to display the information. Does anyone know of a good method by which this can be done? I currently have hard-coded a display which looks like this: Project Task Time Entry Next Project ... My thought is to do something like write methods to display each type and somehow let a user select what order the display would group. Please let me know if I am not being clear enough.

    Read the article

  • Read sms from Mobile device with .net application?

    - by nikunj
    Hello Friends, Can anyone help me? How can I read SMS from mobile with my .net application? i have a Nokia 5310 mobile phone. Can you tell me from where i can download Nokia SDK or source code or Nokia API etc? I want to make a custom application which reads SMS and at the same time sends a response to the sender's mobile number.

    Read the article

  • Problem getting the background image of a form

    - by Deumber
    I'm creating a datagridview transparent //I got the parent background image Bitmap parentBackGround = new Bitmap(this.Parent.BackgroundImage); //Set the area i want to create equal to the size of my grid Rectangle rect = new Rectangle(this.Location.X, this.Location.Y, this.Width, this.Height); //And draw in the entire grid the area of the background image that is cover with my grid, making a "transparent" effect. graphics.DrawImage(parentBackGround.Clone(rect, PixelFormat.Format32bppRgb), gridBounds); When the backgroundimage of the grid's parent is show in an normal layout all work ok, but if the layout is stretch, center or any other, the transparency effent gone, have you any idea to fix it?

    Read the article

  • vb.net inline IF with OR... not evaluating

    - by rockinthesixstring
    I'm working on a small problem where I'm trying to show/hide a panel based on two criteria A specific data field must not be blank The specific data filed must also not equal "Not Relocatable" Unfortunately this doesn't seem to be working for me (note that setting either one or the other criteria works just fine.) <asp:Panel runat="server" Visible='<%#If(Not String.IsNullOrEmpty(DataBinder.Eval(Container.DataItem, "_236")) Or Not DataBinder.Eval(Container.DataItem, "_236") = "Not Relocatable", True, False)%>'> <tr> <td> </td> <td class="align-right lightgreen"> Buyer would consider relocating a business, if it is: </td> <td> </td> <td colspan="3"> <%#DataBinder.Eval(Container.DataItem, "_236")%> </td> <td> </td> </tr> </asp:Panel> Can anyone lend a hand to rectify this problem for me?

    Read the article

  • Quicken like Windows Forms application

    - by WinFXGuy
    Hi All, I need to build a quicken like application, where data needs to be secure. I don't see any database being used by Quicken. I could use XML, MDF or Access database, but data is not secure in the tables. What is the best option? How does Quicken handle it? My application may also have document attachments as well. The functionality of this application is similar to quicken but not an accounting/financial in functionality. Thanks a bunch!

    Read the article

  • User control loosing its contents when loaded programatically

    - by Phil
    I have a usercontrol which contains 2 repeaters and the code to populate them with data. If i manually insert this into the page then it works correctly, the repeaters populate etc. If I load it programatically using this method; 1) add class name to user control ClassName="ContentModule" 2) reference this in the default.aspx <%@ Reference Control="~/modules/content.ascx" %> 3) Add the code to my codebehind page_load to do the loading; Private loadmodule As ASP.ContentModule Try If themodule = "content" Then loadmodule = CType(LoadControl("~\Modules\Content.ascx"), ASP.ContentModule) Modulecontainer.Controls.Add(loadmodule) End If Catch ex As Exception Response.Write(ex.ToString & "<br />") End Try Nothing from within the usercontrol is loaded to the page. Although if I add some static text i.e "TEST" to the top of the usercontrol this is displayed ok on the default.aspx page. This makes me think that the control is loaded ok, but there is something in the way I have loaded it that is causing the contents to not properly execute. Very frustrating this one! Any help greatly appreciated!

    Read the article

  • Perform Grouping of Resultset in Code

    - by NinjaBomb
    Stackoverflowers, I have a resultset from a SQL query in the form of: Category Column2 Column3 A 2 3.50 A 3 2 B 3 2 B 1 5 ... I need to group the resultset based on the Category column and sum the values for Column2 and Column3. I have to do it in code because I cannot perform the grouping in the SQL query that gets the data due to the complexity of the query (long story). This grouped data will then be displayed in a table. I have it working for specific set of values in the Category column, but I would like a solution that would handle any possible values that appear in the Category column. I know there has to be a straightforward, efficient way to do it but I cannot wrap my head around it right now. How would you accomplish it?

    Read the article

  • ToolStripComboBox + objects default string value

    - by Martin
    I am using a ToolStripComboBox to list some data. I am populating this combo with some custom objects: For Each obj As myObject In myObjectList myToolStripComboBox.Items.Add(obj) Next This works great except the text displayed in the combo is the name of the object class. I can understand why and realise that I need to do something to make the combo use a property from my class instead. The help files state: To add objects to the list at run time, assign an array of object references with the AddRange method. The list then displays the default string value for each object. You can add individual objects with the Add method. The bit in bold suggests I need to setup the default string value in my class. How would I go about doing this?

    Read the article

  • icon as an image

    - by Ken
    Hi All, is it possible to use icon file as a image for a button in visual basic? f.e. I have 3 buttons that need to have 3 icons when you click the button the icon of the button needs to be the icon of the form is this posible? btnIcon1 = my.resources.ICO1 btnIcon2 = my.resources.ICO2

    Read the article

  • Gridview delete/edit not working when using select parameter

    - by Brian Carroll
    new to ASP.NET. I created a sqldatasource and set up basic select query (SELECT * FROM Accounts) using the wizard. I then had the sqldatasource wizard create the INSERT, EDIT and DELETE queries. Connected this datasource to a gridview with EDITING and DELETING enabled. Everything works fine. The SELECT query returns all records and I can edit/delete them. Now I need to send a parameter to the SELECT command to filter the records to those with the user's id (pulled from Membership.GetUser). When I add this parameter, the SELECT command works fine, but the EDIT/DELETE buttons in the gridview no longer work. No error is generated. The page refreshes but the records were not updated in the database. I don't understand what is wrong. CODE: <% Dim u As MembershipUser Dim userid As String u = Membership.GetUser(User.Identity.Name) userid = u.ProviderUserKey.ToString SqlDataSource1.SelectParameters("UserId").DefaultValue = userid %> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1"> <Columns> <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" /> <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" /> <asp:BoundField DataField="UserId" HeaderText="UserId" SortExpression="UserId" /> <asp:BoundField DataField="AccountName" HeaderText="AccountName" SortExpression="AccountName" /> <asp:BoundField DataField="DateAdded" HeaderText="DateAdded" SortExpression="DateAdded" /> <asp:BoundField DataField="LastModified" HeaderText="LastModified" SortExpression="LastModified" /> </Columns> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CheckingConnectionString %>" DeleteCommand="DELETE FROM [Accounts] WHERE [ID] = @ID" InsertCommand="INSERT INTO [Accounts] ([UserId], [AccountName], [DateAdded], [LastModified]) VALUES (@UserId, @AccountName, @DateAdded, @LastModified)" SelectCommand="SELECT * FROM [Accounts] WHERE [UserId] = @UserId" UpdateCommand="UPDATE [Accounts] SET [UserId] = @UserId, [AccountName] = @AccountName, [DateAdded] = @DateAdded, [LastModified] = @LastModified WHERE [ID] = @ID"> <DeleteParameters> <asp:Parameter Name="ID" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="UserId" Type="String" /> <asp:Parameter Name="AccountName" Type="String" /> <asp:Parameter Name="DateAdded" Type="DateTime" /> <asp:Parameter Name="LastModified" Type="DateTime" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="UserId" Type="String" /> <asp:Parameter Name="AccountName" Type="String" /> <asp:Parameter Name="DateAdded" Type="DateTime" /> <asp:Parameter Name="LastModified" Type="DateTime" /> <asp:Parameter Name="ID" Type="Int32" /> </UpdateParameters> <SelectParameters> <asp:Parameter Name="UserId"/> </SelectParameters> </asp:SqlDataSource>

    Read the article

  • bat cmd or vb script to move specific files from one location to another location

    - by Praveen
    can someone help me with a bat cmd to move specific files from one location to another location my file structure Source location E:\Test1\2011\18\5730547\5730552\html E:\Test1\2011\18\5730547\6430552\html E:\Test1\2011\38\7730140\2330582\html E:\Test1\2011\19\5718547\5730552\html wherein html folder contains css folder, xml and html files. I want to move only file name contains testcase.html and images.html files from the above location to below location Required location E:\Final1\2011\18\5730547\5730552\html E:\Final1\2011\18\5730547\6430552\html E:\Final1\2011\38\7730140\2330582\html E:\Final1\2011\19\5718547\5730552\html Please help me

    Read the article

  • If Then Statement Condition Being Ignored With Optimisations On

    - by Matma
    I think im going mad but can some show me what im missing, it must be some stupidly simple i just cant see the wood for the trees. BOTH side of this if then else statement are being executed? Ive tried commenting out the true side and moving the condition to a seperate variable with the same result. However if i explicitly set the condition to 1=0 or 1=1 then the if then statement is operating as i would expect. i.e. only executing one side of the equation... The only time ive seen this sort of thing is when the compiler has crashed and is no longer compiling (without visible indication that its not) but ive restarted studio with the same results, ive cleaned the solution, built and rebuilt with no change? please show me the stupid mistake im making using vs2005 if it matters. Dim dset As DataSet = New DataSet If (CboCustomers.SelectedValue IsNot Nothing) AndAlso (CboCustomers.SelectedValue <> "") Then Dim Sql As String = "Select sal.SalesOrderNo As SalesOrder,cus.CustomerName,has.SerialNo, convert(varchar,sal.Dateofpurchase,103) as Date from [dbo].[Customer_Table] as cus " & _ " inner join [dbo].[Hasp_table] as has on has.CustomerID=cus.CustomerTag " & _ " inner join [dbo].[salesorder_table] as sal On sal.Hasp_ID =has.Hasp_ID Where cus.CustomerTag = '" & CboCustomers.SelectedValue.ToString & "'" Dim dap As SqlDataAdapter = New SqlDataAdapter(Sql, FormConnection) dap.Fill(dset, "dbo.Customer_Table") DGCustomer.DataSource = dset.Tables("dbo.Customer_Table") Else Dim erm As String = "wtf" End If EDIT: i have found that this is something to do with the release config settings im using, i guesing its the optimisations bit. does anyone know of any utils/addons for vs that show if a line has been optimised out. delphi, my former language showed blue dots in the left margin to show that it was a compiled line, no dot meaning it wasnt compiled in, is there anything like that for vs? alternatively can someone explain how optimisations would affect this simple if statement causeing it to run both sides? EDIT2: using this thread as possible causes/solutions : http://stackoverflow.com/questions/2135509/bug-only-occurring-when-compile-optimization-enabled. It does the same with release = optimisations on, x86, x64 and AnyCPU Goes away with optimisations off. Im using V2005 on a x64 win7 machine, if that matters. Thanks

    Read the article

  • XML and ServerXMLHTTP problem

    - by ZAfrican
    Error Type: msxml3.dll (0x80072F0C) A certificate is required to complete client authentication I am sending an XML file to a remote server putUrl =https://www.myweb.com/test/drhandler.php xml_put = "<?xml version=""1.0""?><subscription id=""" & "14" &"""><status>" &"das" & "</status></subscription>" Public Function SendBatch(xml_put,putUrl) Set xmlhttp = CreateObject("MSXML3.ServerXMLHTTP") xmlhttp.Open "PUT", putUrl , False xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" xmlhttp.send(xml_put) Set xmlhttp = Nothing end function Any help out there?

    Read the article

  • Overwrite values when using gridview Edit?

    - by sah302
    I am using a GridView which is bound to a LinqDataSource and using the automatic edit and delete buttons. However, I don't want the user to edit two of the columns manually, but done automatically. Specifically username who last updated the entry, and the date it was updated. The gridview only contains 3 columns: Name, Date modified, last updated by. Right now when the user clicks the edit button they can only edit the name column (other two set to read-only). Upon clicking the update button, I want the other 2 fields to update as well based on some extra code. I thought this was done in the code behind within the event rowUpdating, but it doesn't seem to work. My gridview: <asp:GridView ID="gvNewsSources" runat="server" AutoGenerateColumns="False" DataSourceID="ldsNewsSource" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" CellPadding="4" ForeColor="#333333" GridLines="None" DataKeyNames="Id"> <RowStyle BackColor="#F7F6F3" ForeColor="#333333" /> <Columns> <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /> <asp:BoundField DataField="LastUpdatedBy" HeaderText="Last Updated By" SortExpression="LastUpdatedBy" ReadOnly="True" /> <asp:BoundField DataField="DatedModified" HeaderText="Dated Modified" SortExpression="DatedModified" ReadOnly="True" /> </Columns> <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /> <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <EditRowStyle BackColor="#999999" /> <AlternatingRowStyle BackColor="White" ForeColor="#284775" /> </asp:GridView> My code behind: Partial Class _Default Inherits System.Web.UI.Page Protected Sub gvNewsSources_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles gvNewsSources.RowUpdating e.NewValues("LastUpdatedBy") = GetUser.GetUserName e.NewValues("DateModified") = Date.Now() lblOutput.Text = e.NewValues("DateModified").ToString() End Sub End Class Yet when I run through this, I get no errors, but the values aren't being updated in the database or in the gridview. I ran through debug mode and the new values dictionary starts at 1 and ends up being 3 by the end of the rowUpdating event and the value is being set (tested by output the newValue of Datemodified), but it isn't saving. What am I doing wrong?

    Read the article

  • Windows components in .net

    - by JGC
    hi I need a component in .net which able me to partition a year to some part which is making by clicking at the beginning of the part and click again at the end of that. the shape below is a sample of my need but I create it by buttons and back-color of them for showing for you: I don't know the name of this component to search for that. does anyone know this component or something like this? thank you

    Read the article

  • Is a base class with shared fields and functions good design

    - by eych
    I've got a BaseDataClass with shared fields and functions Protected Shared dbase as SqlDatabase Protected Shared dbCommand as DBCommand ... //also have a sync object used by the derived classes for Synclock'ing Protected Shared ReadOnly syncObj As Object = New Object() Protected Shared Sub Init() //initializes fields, sets connections Protected Shared Sub CleanAll() //closes connections, disposes, etc. I have several classes that derive from this base class. The derived classes have all Shared functions that can be called directly from the BLL with no instantiation. The functions in these derived classes call the base Init(), call their specific stored procs, call the base CleanAll() and then return the results. So if I have 5 derived classes with 10 functions each, totaling 50 possible function calls, since they are all Shared, the CLR only calls one at a time, right? All calls are queued to wait until each Shared function completes. Is there a better design with having Shared functions in your DAL and still have base class functions? Or since I have a base class, is it better to move towards instance methods within the DAL?

    Read the article

  • what is wrong with connection string

    - by Hakan
    Can any one help me with this connection string. I can't manage how to fix. Dim constring As String Dim con As SqlCeConnection Dim cmd As SqlCeCommand constring = "(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + \\database.sdf;Password=pswrd;File Mode=shared read" con = New SqlCeConnection() con.Open() Thanks

    Read the article

  • Try catch finally blocks.. do i still need them?

    - by Phil
    I am handling errors via my global.asax in this method: Dim CurrentException As Exception CurrentException = Server.GetLastError() Dim LogFilePath As String = Server.MapPath("~/Error/" & DateTime.Now.ToString("dd-MM-yy.HH.mm") & ".txt") Dim sw As System.IO.StreamWriter = New System.IO.StreamWriter(LogFilePath) sw.WriteLine(DateTime.Now.ToString) sw.WriteLine(CurrentException.ToString()) sw.Close() In my code I currently have no other error handling. Should I still insert try, catch, finally blocks? Thanks.

    Read the article

  • Displaying windows-1252 text in a literal control

    - by GordonB
    I currently have an aspx page that has a placeholder on it. In the code-behind page i'm adding a literal control to the placeholder controls collection. The literal control just contains text/html read from a sql server database field. The only text character encoding i've used so far is UTF-8. I have the requirement for a specific page to use windows-1252 encoding. I've strapped this to the page, and browsers now recognise the proper encoding. <% Response.Charset= "windows-1252" %> My issue is that i have various german characters ( ö / ü / etc ) that aren't displaying correctly. As presumably they are still be written to the page in UTF-8 not in windows-1252. I'm looking at; Dim textEncoder = System.Text.Encoding.GetEncoding(1252) Which seems to be more geared up to dealing with byte arrays than text. Do i have to change my text to a byte array then encode as windows-1252 then get the text back out again, or is there a simpler way of achieving what i'm after?

    Read the article

< Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >