Search Results

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

Page 105/179 | < Previous Page | 101 102 103 104 105 106 107 108 109 110 111 112  | Next Page >

  • How is this inupt tag linking to another page?

    - by Matt
    Response.Write("<div><input type='submit' name='submit' value='Update Cart' /></div>") Response.Write("<div><input type='submit' name='submit' value='Shop More' /></div>") Response.Write("<div><input type='submit' name='submit' value='Checkout' /></div>") that is some example code from my teacher, but he hasn't answered my email in a couple days so I need some help. When you click the Update Cart button it just updates the cart page it's on, but when you click the Shop More button it links to Shop.aspx a different page, and the Checkout links to another page as well. I can't figure out how it is linking just from that code, anybody have any insights?

    Read the article

  • Why do I get this error message very often ?

    - by ahmed
    "There is no row at position 0." Hi I keep on getting this error message. If mytable.rows(0).items(2) >= 0 then dim myid = dt.Rows(0).Item(6).ToString End if Please help me in this matter and I would never ever like to see this message again.Thanking you all.

    Read the article

  • .Net Regular Expression

    - by xzerox
    Alright so I want to grab the information on a website thats between [usernames] and [/usernames] I know how to get the string but how would I use regex to only have the information in the middle. Remember I am going to be having more then one thing on the page.

    Read the article

  • how to know when a work in a thread is complete?

    - by seinkraft
    I need to create multiple threads when a button is clicked and i've done that with this: Dim myThread As New Threading.Thread(AddressOf getFile) myThread.IsBackground = True myThread.Start() but i need to update a picture box with the downloaded file, buy if i set an event in the function getFile and raise it to notify that the files was downloaded and then update the picturebox.

    Read the article

  • "Inline" function call: function is never hit

    - by Shimrod
    Hi everybody. I'm trying to make a tabbed menu for the asp.net website I'm working on. One of the pre-requisite is obviously to color the current tab differently, so the user can know on which tab is currently is. To do this, I made this method in my code-behind: Protected Function GetCssClass(ByVal ctrl As LinkButton) As String If ctrl.ID = currentLink Then Return "current" Else Return String.Empty End If End Function and I call the method like this in my aspx page: <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="/Default.aspx" CssClass="<%#GetCssClass(LinkButton1) %>" >Home</asp:LinkButton> <asp:LinkButton ID="LinkButton2" runat="server" PostBackUrl="/Directory/page1.aspx" CssClass="<%#GetCssClass(LinkButton2) %>" >Page1</asp:LinkButton> But the method is never hit... As I understand, the method should be called each time the LinkButton is drawn... Does someone have an idea why? Thanks in advance !

    Read the article

  • Object reference not set to an instance of an object.....?

    - by jamal
    Hi guys I always got this error from my site and it keeps bugging me.I've been trying to figure out the cause of this error but I can't really figure it out. Here's the stacktrace: at BasePage.Page_PreInit(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Page.OnPreInit(EventArgs e) at System.Web.UI.Page.PerformPreInit() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) And on my basepage I only got this code: Imports Microsoft.VisualBasic Public Class BasePage Inherits System.Web.UI.Page Private Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit Page.Theme = "Something" If (Request.UserAgent.IndexOf("AppleWebKit") 0) Then Request.Browser.Adapters.Clear() End If End Sub Private Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender If Me.Title = "Untitled Page" Then Throw New Exception("Page title cannot be ""Untitled Page"".") End If End Sub End Class According to the stacktrace this always happens on my basepage preinit event.What do you think is the problem here guys?

    Read the article

  • HTML input not working correctly with AJAX update panels used else where on page

    - by Sean P
    I have some update panels on my page that do some asyncpostbacks to keep some dropdownlists correctly populated. My problem is that on my page i have an HTML input that is handling some file uploads. With the AJAX on the page with asyncpostbacks, and while i step through my code behind, the files arent being uploaded. Using a postbacktrigger (non-async) is not possible because of my layout. Here is my code: <div id="divFileInputs" runat="server"> <input id="file1" name="fileInput" type="file" runat="server" size="50" style="width: 50em" onfocus="AddFileInput()" class="textbox" /></div> <select id="selectFileList" name="ListBox1" size="5" style="width: 50em; text-align: left;" class="textbox" /> <input id="RemoveAttachmentButton" type="button" value="Remove" onclick="RemoveFileInput()" class="removebutton " /> </div> Here is my code behind: Protected Sub CopyAttachments(ByVal issueId As String) Dim files As HttpFileCollection = Request.Files Dim myStream As System.IO.Stream Dim service As New SubmitService.Service For i As Integer = 0 To files.Count - 1 Dim postedFile As HttpPostedFile = files(i) Dim fileNameWithoutPath As String = System.IO.Path.GetFileName(postedFile.FileName) If fileNameWithoutPath.Length > 0 And issueId.Length > 0 Then Dim fileLength As Integer = postedFile.ContentLength Dim fileContents(fileLength) As Byte ' Read the file into the byte array. Send it to the web service. myStream = postedFile.InputStream myStream.Read(fileContents, 0, fileLength) service.ClearQuestAttachToIssue(issueId, fileNameWithoutPath, fileContents) End If Next service = Nothing End Sub When I put a breakpoint in at the declaration of service and then check the value of "files", the count is 0. I am expecting it to be 2 when i have one file uploaded. Anyone know how to fix this?

    Read the article

  • Import CSV to class structure as the user defines

    - by Assimilater
    I have a contact manager program and I would like to offer the feature to import csv files. The problem is that different data sources order the fields in different ways. I thought of programming an interface for the user to tell it the field order and how to handle exceptions. Here is an example line in one of many possible field orders: "ID#","Name","Rank","Address1","Address2","City","State","Country","Zip","Phone#","Email","Join Date","Sponsor ID","Sponsor Name" "Z1234","Call, Anson","STU","1234 E. 6578 S.","","Somecity","TX","United States","012345","000-000-0000","[email protected]","5/24/2010","z12343","Quantum Independence" Notice that in one data field "Name" there is a comma to separate last name and first name and in another there is not. My plan is to have a line for each field (ie ID, Name, City etc.) and a statement "import to" and list box with options like: Don't Import, BusinessJoin Date, First Name, Zip and the program recognizes those as properties of an object... I'd also like the user to be able to record preset field orders so they can re-use them for csv files from the same download source. Then I also need it to check if a record all ready exists (is there a record for Anson Call all ready?) and allow the user to tell it what to do if there is a record (ie mailing address may have changes, so if that field is filled overwrite it, or this mailing address is invalid, leave the current data untouched for this person, overwrite the rest). While I'm capable of coding this...i'm not very excited about it and I'm wondering if there's a tool or set of tools out there to all ready perform most of this functionality... I hope this makes sense...

    Read the article

  • Is there bug in the Matrix.RotateAt method for certain angles? .Net Winforms

    - by Jules
    Here's the code i'm using to rotate: Dim m As New System.Drawing.Drawing2D.Matrix Dim size = image.Size m.RotateAt(degreeAngle, New PointF(CSng(size.Width / 2), CSng(size.Height / 2))) Dim temp As New Bitmap(600, 600, Imaging.PixelFormat.Format32bppPArgb) Dim g As Graphics = Graphics.FromImage(temp) g.Transform = m g.DrawImage(image, 0, 0) (1) Disposals removed for brevity. (2) I test the code with a 200 x 200 rectangle. (3) Size 600,600 it just an arbitrary large value that I know will fit the right and bottom sides of the rotated image for testing purposes. (4) I know, with this code, the top and left edges will be clipped because I'm not transforming the orgin after the rotate. The problem only occurs at certain angles: (1) At 90, the right hand edge disappears completely. (2) At 180, the right and bottom edges are there, but very faded. (3) At 270, the bottom edge disappears completely. Is this a known bug? If I manually rotate the corners an draw the image by specifying an output rectangle, I don't get the same problem - though it is slightly slower than using RotateAt.

    Read the article

  • Resize my image on upload not working - what must my buffer be?

    - by Etienne
    This is the code i got from This Link I want the user to upload a picture and then resize it............. Public Sub ResizeFromStream(ByVal ImageSavePath As String, ByVal MaxSideSize As Integer, ByVal Buffer As System.IO.Stream) Dim intNewWidth As Integer Dim intNewHeight As Integer Dim imgInput As System.Drawing.Image = System.Drawing.Image.FromStream(Buffer) 'Determine image format Dim fmtImageFormat As ImageFormat = imgInput.RawFormat 'get image original width and height Dim intOldWidth As Integer = imgInput.Width Dim intOldHeight As Integer = imgInput.Height 'determine if landscape or portrait Dim intMaxSide As Integer If (intOldWidth >= intOldHeight) Then intMaxSide = intOldWidth Else intMaxSide = intOldHeight End If If (intMaxSide > MaxSideSize) Then 'set new width and height Dim dblCoef As Double = MaxSideSize / CDbl(intMaxSide) intNewWidth = Convert.ToInt32(dblCoef * intOldWidth) intNewHeight = Convert.ToInt32(dblCoef * intOldHeight) Else intNewWidth = intOldWidth intNewHeight = intOldHeight End If 'create new bitmap Dim bmpResized As Drawing.Bitmap = New Drawing.Bitmap(imgInput, intNewWidth, intNewHeight) 'save bitmap to disk bmpResized.Save(ImageSavePath, fmtImageFormat) 'release used resources imgInput.Dispose() bmpResized.Dispose() Buffer.Close() End Sub Now when i click on my submit button it must execute my code but i am not sure what the input must be for the Buffer field? Protected Sub btnUpload_Click() Handles btnUpload.Click ResizeFromStream("~Pics", 200, ??????????) End Sub Thanks in advanced! Edit I need to get my Image from the File Upload control!

    Read the article

  • Creating Reports in ASP.NET

    - by Norbs
    I have a crystal report in my application and it works fine but I want to ask if there's a way that the user can manipulate the report that he/she wants? For example, the user wants to create his/her own report. in my application, there are already reports available. They just need to click the link and it will show immediately the specific report. What if the user wants to create his/her own report? Is it possible???

    Read the article

  • How to break whenever any line of code executes

    - by Aequitarum Custos
    I have a very strange bug, which I believe is caused by some code we have executing, but I'm not sure where. We can reproduce it to the point it happens whenever we click Tab, but short of putting a break point at the beginning of every method in the project to find out what is executing. Is there a way to set visual studio to break whenever anything executes? For those curious about the problem, every now and then, we have a few Rich Text Boxes that refuse to lose focus. You can't click out of it or tab out of it. We have no On Validation or On Text Changed events attached to the control, and believe it's an event attached somewhere else to something we just aren't noticing.

    Read the article

  • CAD/CAM without C++

    - by zaladane
    Hello, Is it possible to do CAD/CAM software without having to use C++? My company developed their software with c/C++ but that was more than 10 years ago. Today,there is a lot of legacy code that switching would force us to get rid of but i was wondering what the actual risks are. We have a lot of mathematical algorithms for toolpath calculations, feature recognition and simulation and 3D Rendering and i was wondering if C# can handles all of that without great performance loss. Is it a utopia to rewrite such algorithms in c# or should that language only deal with UI. We are not talking about game development here (Halo 3 or Call Of Duty) so how much processing does CAD/CAM really need? Can anybody enlighten me on this matter? Most of my colleagues are hardcore C++ programmers and although i program in c++ i love .NET but i am having a hard time selling .NET to them other than basic UI. Does it make sense to consider switching to .NET in such a field, or is it just not a wise idea? Thank you

    Read the article

  • Best way in asp.net to force https for an entire site?

    - by theminesgreg
    About 6 months ago I rolled out a site where every request needed to be over https. The only way at the time I could find to ensure that every request to a page was over https was to check it in the page load event. If the request was not over http I would response.redirect("https://mysite.com") Is there a better way -- ideally some setting in the web.config?

    Read the article

  • How do I put a listing of files into a menu?

    - by PandaNL
    I have a folder with .txt files in it. How can i make my menuitem get those .txt files and put the filenames in the menuitem, so that it creates a list of all .txt files in that folder. So when i put a .txt in the folder the program automatically creates the menu item. Does someone knows how to do this, or perhaps an example?

    Read the article

  • Saving ntext data from SQL Server to file directory using asp

    - by April
    A variety of files (pdf, images, etc.) are stored in a ntext field on a MS SQL Server. I am not sure what type is in this field, other than it shows question marks and undefined characters, I am assuming they are binary type. The script is supposed to iterate through the rows and extract and save these files to a temp directory. "filename" and "contenttype" are given, and "data" is whatever is in the ntext field. I have tried several solutions: 1) data.SaveToFile "/temp/"&filename, 2 Error: Object required: '????????????????????' ??? 2) File.WriteAllBytes "/temp/"&filename, data Error: Object required: 'File' I have no idea how to import this, or the Server for MapPath. (Cue: what a noob!) 3) Const adTypeBinary = 1 Const adSaveCreateOverWrite = 2 Dim BinaryStream Set BinaryStream = CreateObject("ADODB.Stream") BinaryStream.Type = adTypeBinary BinaryStream.Open BinaryStream.Write data BinaryStream.SaveToFile "C:\temp\" & filename, adSaveCreateOverWrite Error: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. 4) Response.ContentType = contenttype Response.AddHeader "content-disposition","attachment;" & filename Response.BinaryWrite data response.end This works, but the file should be saving to the server instead of popping up save-as dialog. I am not sure if there is a way to save the response to file. Thanks for shedding light on any of these problems!

    Read the article

  • Properly Repaint a Custom Control

    - by serhio
    I am doing a custom control, that should be painted like as standard one, but also having a Icon displayed near it. So, I jet overrided OnPaint like this: protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) {     base.OnPaint(e);     e.Graphics.DrawIcon(theIcon, X1, Y1 - iconSize.Width / 2); } Now, everything is OK, but when my control moves, the icon still remains drawn on the ancient place. What should I add to manage it properly? In the image we can see that after moving from top to bottom the line(custom control) even is not properly redrawn. I tried to do public override void Invalidate() {     base.Invalidate();     if (Parent != null) {         Parent.Invalidate(new Rectangle( X1, Y1 - iconSize.Width / 2, iconSize.Width, iconSize.Height));     } } but this does not work - when changing location the Invalidate is not even called. If it matter the custom control inherits from VisualBasic.PowerPacks.LineShape component.

    Read the article

  • ASP.Net event only being raised every other time?

    - by eftpotrm
    I have an ASP.Net web user control which represents a single entry in a list. To allow users to reorder the items, each item has buttons to move the item up or down the list. Clicking on one of these raises an event to the parent page, which then shuffles the items in the placeholder control. Code fragments from the list entry: Public Event UpClicked As System.EventHandler Protected Sub btnUp_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUp.Click RaiseEvent UpClicked(Me, New EventArgs()) End Sub And the parent container: rem (within the code to add an individual item to the placeholder) AddHandler l_oItem.UpClicked, AddressOf UpClicked Protected Sub UpClicked(ByVal sender As Object, ByVal e As EventArgs) MoveItem(DirectCast(sender, ScriptListItem), -1) End Sub It originally looked in testing like every other time the value for sender (verified by its properties) that reaches UpClicked is of an adjacent ListItem, not the one I've just clicked on - the first click is always wrong, then the second for the correct control. At present, testing appears to show that the button's click event is just being ignored every other time through. Breakpoints on the click events within the control simply aren't being hit, though the events are definitely being established. Why?

    Read the article

  • I've caught an exception!! Now what?

    - by Jonesy
    Hi folks, I've started using try catch blocks (bit late i know!) but now im not sure what to do with the exception once i've caught it. What do people usually do here? -- Jonesy Try connection.Open() Dim sqlCmd As New SqlCommand("do some SQL", connection) Dim sqlDa As New SqlDataAdapter(sqlCmd) sqlDa.Fill(dt) Catch ex As SQLException ' ahhhh what to do now!!!? Finally connection.Close() End Try

    Read the article

  • Does HttpWebRequest automatically take care of certificate validation?

    - by Kevin Pang
    I'm using an HttpWebRequest object to access a web service via an HTTP POST. Part of the requirement is that I: Verify that the URL in the certificate matches the URL I'm posting to Verify that the certificate is valid and trusted Verify that the certificate has not expired Does HttpWebRequest automatically handle that for me? I'd assume that if any of these conditions came up, I'd get the standard "could not establish trust relationship for the SSL/TLS secure channel" exception.

    Read the article

  • Class Property in for each

    - by KoolKabin
    Hi guys, I am running from a problem while iterating over class properties. I have my first class: class Item private _UIN as integer = 0 private _Name as string = "" private _Category as ItemCategory = new ItemCategory() public Property UIN() as integer public property Name() as string public property Category() as ItemCategory end class Now when i iterate over the class properties from following code Dim AllProps As System.Reflection.PropertyInfo() Dim PropA As System.Reflection.PropertyInfo dim ObjA as object AllProps = new Item().getType().getProperties() for each propA in AllProps ObjA = PropA.GetValue(myObj, New Object() {}) debug.write ObjA.GetType().Name next I get UIN, Name, ItemCategory but i expected UIN, Name and Category. I am a bit unclear about this and dun know why this is happening? What should i do to correct it?

    Read the article

< Previous Page | 101 102 103 104 105 106 107 108 109 110 111 112  | Next Page >