Asp.net - Getting .NET To Handle CSS Files?
Jul 25, 2011
Possible Duplicate: Can .NET intercept and change css files?
I have configured IIS6 to get .NET to handle css files.I did the following steps
Launch IIS Manager Right-click on Default Web Site Click on the Home Directory tab Under Application Settings click on Configuration.Add a new association for .css and map it to .NET executable:
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727aspnet_isapi.dll
How can I check if this is working, i.e. I want to change the default style of a page depending on the url, i.e. if the referer url is http://intranet, it should continue to use the old existing style style1.css, if the referer url is http://intranetv2, it should use the new style style2.css.
View 2 Replies
ADVERTISEMENT
Jul 17, 2009
i have an old VB6 system that generates plain text files. When this old system writes "A" into the file, it writes (hex) "41". For an "ä" (a-umlaut, special gernam character), it writes (hex) "E4".
Now i have to process files like this in VB.Net. when i open such a file in the IDE, it displays correctly "ä" (But not always!). To see what i mean, please open a notepad and create a new file "ae.txt" with content: äöü. Now your file contains exactly 3 bytes: (hex) E4 F6 FC.
But when i write code like
Dim strTest As String
strTest = File.ReadAllText("ae.txt")
Debug.Print(InStr(strTest, "ä"))
i get 0 - so i cannot find back the "ä" - what do i need to do, to find it? And 2) for compatibility reasons, i have also to be able to create such files. How to do that? Seems the different encoding types do not work as i think.
View 2 Replies
Feb 25, 2009
how to make VB handle my associated files.I made a program that opens fine when from the EXE file. But however, when I try to open it from the associated file, it behaves the same way as if opened from the EXE.So, where (in what method?) do I tell VB how to handle those files?
View 8 Replies
May 2, 2011
I have been working on a program and I need it to unzip a zip file. I tried handling a zip file as a directory but that didn't work.It wouldn't hurt if I could compress files into a zip file to! But I need unzipping the file first.This is my code handling it as a directory:
Dim count As Integer = Directory.GetFiles(My.Application.Info.DirectoryPath & "Games" & game & "�00.zip").Length
MessageBox.Show(count)
It has an error saying it is not a valid directory name.
View 4 Replies
Jan 9, 2012
I know this idea of - if message boxes are used to display error messages inside a .dll and when the .dll is installed in a different computer (possibly a server machine), errors occurring inside that .dll will be shown in the server and not to the user. Since practically there will not be a person near the server to click 'OK' to the error message every time it occurs it will stuck the programs using the .dll.
So how to write exception handling to a .dll project?
View 1 Replies
Jan 17, 2011
I am trying to get a list of files using this line of Dim files() As String = IO.Directory.GetFiles("D:", "*.*", SearchOption.AllDirectories)But it errors out on folders that are inaccessible, like the RecycleBin folder & the program stops. So how do I get a list of files in all folders, while skipping the inaccessible one
View 1 Replies
May 4, 2011
I have a very huge server log files like files are more than 500 to 600 mb and even some files are over 2 gb data. the files are maintained for few years. it will be maintained as is. each log file has at least 1 million lines to 20 million lines.I am looking create an application which can find a line in the text file using regex, removing duplicate entries.how these huge file can be handled in a way it works very quickly.
View 5 Replies
Jan 27, 2011
I have some functions written in C that read & write large binary files (> 4 GB) using routines CreateFile, ReadFile, WriteFile & SetFilePointer, that use the HANDLE data type to access the file. Some others who are more familiar with Visual Basic would would like to be able to call my C routines to work with such large binary files. We particularly need SetFilePointer to jump around with the files.
[Code]...
View 2 Replies
Mar 16, 2010
Since I am new to VB .NET , I would like to ask some general questions about it . Here we go :
[Code]...
View 29 Replies
Mar 23, 2009
I wrote an application to handle a joystick with directinput. It works fine if it uses the handle of the main window but it doesnt happen the same if the handle is the one of the component that contains the joystick's operation.
I mean:
main form handle: 15
component handle (which is inside the window and the joystick needs the focus of this component to work): 25
It always work if the handle i initilizate the device is the main form (15).How can i use only the handle of the component?
View 1 Replies
Aug 6, 2009
I can't get a handle on the syntax. Can anyone give me a simple demo?
View 3 Replies
Jul 2, 2009
I am trying to get a handle on the correct way and easiest way to do things. By easiest I am not talking about being lazy just accessing and modifying later on. I have started using my own classes and such but I have a few questions. Sometimes I want to create a control on the fly through code instead of using the designer. Should I create this control in the main form file or in a separate class? If I make it in another class it seems harder to access later on. Then again if I dont know that the control is going to be created(user clicks a button to add a control) how can I access it? Also it seems alot harder to access certain things when it is in another class. For example if I create a new window in a class and then want to check if it is there or not it is alot harder to do.
View 5 Replies
Feb 13, 2012
Are there anyone know how to get the handle of a standard Combobox using API?
View 3 Replies
Dec 13, 2011
How do i get the handle of a NotifyIcon?
View 4 Replies
May 8, 2009
I need the intPtr for a form. Control.FromHandle(control) gives me the control from a handle, but I need the opposite--get the handle from a control. How do I do this?
View 2 Replies
Apr 27, 2009
I need to get the handle of a control as an IntPtr to pass to a screen capture class in vb.Net 3.0. Tried this but get an invalid handle exception.
Dim hwnd As IntPtr = Runtime.InteropServices.GCHandle.Alloc(CanvasMap)
View 2 Replies
Jan 24, 2012
I am trying to create a small utility that tracks desktop usage in detail, to the level of individual text boxes etc.... in other applications. However, it is proving quite tricky. I thought I had it nailed using the Windows api. The below code is just a snipet of the code but essentially it provides me the handle of the control that the mouse is over. I thought from here, it would be easy to to the same thing but to provide the handle of the control that the cursor was actually clicked on, for example, if someone is filling in a text box in an application, they would not necessarily move the mouse to get to the text box, they may tab to it. Does anyone know if there is a way to get the handle of the control that is in use?
Private Sub Timer1_Tick(sender As Object, e As System.EventArgs) Handles Timer1.Tick
Dim ptx As Integer = Cursor.Position.X
Dim pty As Integer = Cursor.Position.Y
[code]....
View 4 Replies
Apr 12, 2011
I need to get the handle of a window with a specific name from my vb.net application. The form isn't actually from my application.
View 1 Replies
Jun 23, 2009
I am going mad about getting the process id for one existing handle on VB2008.I tried both GetWindowThreadProcessId(hwnd, pid) and GetProcessId(hwnd), while PID always returns 0, I tried the same things in VBA of Excel, it works perfect, so this is somewhat weird,
View 8 Replies
Jun 22, 2010
I have referred DLL in my project. I have to handle the event from DLL in VB.net code. I guess we can do using WithEvents. Can you give me complete picture?
View 2 Replies
May 6, 2009
I am having a SP run in my VB application every 10 seconds to check for any new rows that have been inserted to the database since the last check. What is the best way to do this? Most likely it will be 0 or 1 rows, but I am afraid at random times it maybe more than 1 and so I thought I would fill it in a DataSet, but I came in here to see if there are any other better ways. If dataset is the best way, how do I do a For Each Row in the dataset to process some VB code for each row?
View 20 Replies
Jan 19, 2009
I read stuff from a SQL DB (database) using a data set. Some of the columns in the DB may contain NULL. I want to go through the table in the dataset and print, or use in some other way, the data. But when I try to use a certain data that corresponds to a NULL in the DB my program crashes.How can I detect - in the dataset - that it has no value and that I shouldn't try to use it?
Private Sub Get�rendenLista(ByVal e As System.EventArgs)
'----------------------------------------------------------------------
' This function fetches a list of �rende from the table �rende
'----------------------------------------------------------------------
Dim cno As New SqlConnection
[code]....
View 6 Replies
Sep 12, 2009
The short program below runs just fine when it is the only item on a form. However, when I put it into the ItemInsertTemplate of a ListView control, I get the following message:
Handles clause requires a WithEvents variable defined in the containing type or one of its base types
Line 30: Protected Sub btnDate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDate.Click
The error message identifies Line 30 as the problem.I get the same message for Sub clnEvent_SelectionChanged How do I correct this?
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="clnControl.aspx.vb" Inherits="clnControl" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
[code].....
View 2 Replies
Nov 22, 2009
Does anybody know if there is an API function that would let me cancel a print job.I already know how to get a handle to a printer and how to enumerate the print jobs using the printer handle.
View 1 Replies
Jan 27, 2010
I have several installations of my Linq-to-Sql app running in the field. Now I've created a new version, which adds a new column to a certain table. I've added this column in the dbml file. But when updating the installation, I want to preserve the existing database. How to handle this? Linq-to-SQL doesn't seem to like this inconsistency.Is there an easy way to update the existing database using my new dbml file?
View 1 Replies
Oct 11, 2010
I am retrieving a database object and trying to set the values of the object's fields to various textboxes in my vb.net page
View 3 Replies
Jul 27, 2010
my computer model has an eject key on top of it (touch sensitive), this handles the CD ejecting. But Windows doesn't native support this button, and I have to use Dell QuickSet to use this button (otherwise it does nothing). I need to hook onto this key and eject the CD Drive when it is pressed (I already have the ejecting and the hooking done). But I have no idea how to detect this key? There is no key in the key list for VB.NET, and I don't know what the eject button sends (Numerical wise) so I can't handle it that way. Does anybody know how to handle the eject key?
View 2 Replies
Mar 10, 2010
I am making a vb.net program that calls several other subprograms. None of them effect the other.If there is an error in 1 of them, how do you record the error but continue on to the next subprogram with out stopping everything ?
View 1 Replies
Jun 22, 2010
I was working on a project in my VB.NET Express and suddenly my code that was working fine and starting up as normal gave me this error:
{An error occurred creating the form. See Exception.InnerException for details. The error is: Corrupt .resources file. Got an unexpected EndOfStreamException while trying to read the ResourceReader header.}
When I'm trying to run my application, it doesn't open my main form.
View 3 Replies
Nov 23, 2009
Ok, I'm not sure how to explain this, but I'll give it my best shot.I want my console application to be able to do one function I have when you click one option on the windows context menu, and another function when you click another option.
View 2 Replies