|
Hi,
The Request.QueryString property returns a read-only System.Collections.NameValueCollection object. You won't be able to modify it no matter how hard you try.
You will need to copy that collection over to a new NameValueCollection in order to modify it.
It's a shame that the HttpRequest.QueryString documentation doesn't mention that it is read-only, but a quick look with Reflector confirms it.
|
|
|
|
|
Thanks a lot. I found out about that after doing some research...
|
|
|
|
|
I would like to show a weekly 52(or monthly 12) budget report for one year with Bar Chart graph.
I am new with VB.net. By any chance, someone can show me how to do it, or a link where I can learn how to do it?
Thank for any help,
|
|
|
|
|
Do you want to use a) a third party component or a) draw it yourself?
a) Have a look at Office Web Components, free and easy, do a search on MSDN for it
b) Have a look at drawing with GDI+ Bob Powell[^] is a great start.
Hope this helps
Tom
|
|
|
|
|
Hi,
I want to give user specific size print out size (not A4)for Dot Matrix printer when user click on a button of my VB application. please help me. I have to complete my application.
|
|
|
|
|
hi,
one way is to create a custom paper size.
Open the printer control panel
Click on 'File', 'Server propertys'
There you can create a new paper format.
Hope this helps
|
|
|
|
|
i am currently doing my project using vb.net and asp.net, but now have met a problem.
i have compiled the files that i need to use in .dll form, but i do not know how to call it to be used in my program. does anyone can teach me how to call a .dll file to be used in the program in vb.net?(i mean the programming steps and codes)
thx in advance!
|
|
|
|
|
lsch1983 wrote:
i have compiled the files that i need to use in .dll form, but i do not know how to call it to be used in my program
This is confusing Visual Studio does all this for you. You create your ASPX pages, you write the code in the code behind, you press build and it builds it and puts it in your web server and then you can run it.
Or, have you created a Class Library with extra code in it? If this is so, then the Class Library project should be added to the solution where the Web Application is, then you can right-click your Web Application project and select Add Reference, then click the properties tab, then double-click the Class Library project then you can close the dialog and build your project again. The Class Library will be referenced in your Web Application project so that it can be used. However if this was your problem then I cannot see how Visual Studio ever managed to successfully build your project in the first place.
You need to be more specific when describing your problem.
Do you want to know more?
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums Upcoming talk:
SELECT UserName, Password FROM Users
-- Getting unauthorised access to a SQL Server, and how to prevent it.
|
|
|
|
|
Thanks for your reply....
Actually, I created the .DLL files using MATLAB, then I used the Add Reference(in VB.net) to add it to my project, which is a Web Application.
Now, I need to invoke those .DLL to be used, but I do not know what are the steps and codes to be written in my .aspx.vb files to invoke the .DLL files. So, I was wondering how should I code it.
|
|
|
|
|
Hi,
Notes :
-------
- If we want to call a COM(.DLL) which was created in .NET Application to another .NET Application then It has to be done as follows...
General Notes :
---------------
- It is an ease method to create a COM Interop.
- Visual Basic .NET builds the assembly and registers the COM object with the operating system automatically(implicitly)
- Select New Project and Select Class Library on Templates area.
- Change the Name ClassLibrary1 to COMINterop1.
- Select The button OK.
- Now a Class Library Opened.
We have to Add a COM Class as following…
----------------------------------------
- Select Add New Item… in Project Menu.
- Select COM Class from Templates area.
- Change the Name COMClass1 to COM_1
- Click the button Open.
- The COM must has constructor sub New() otherwise the COM may not Registered / Instantiated.
- The Constructor must not take place any Parameter.
- Write yhe following code within the COM Class as follows…
'--- Code Begins Here
<comclass(com_1.classid, com_1.interfaceid,="" com_1.eventsid)=""> _
Public Class Com_1
Public Enum T
Capital = 1
Small = 2
End Enum
Public Const NewLine = vbCrLf
Public Function Letters(ByVal [Option] As T) As String
Dim Nos As Integer, Conc As String
Select Case [Option]
Case T.Capital
For Nos = 1 To 26
Conc &= Chr(Nos + 64) & NewLine
Next
Case T.Small
For Nos = 1 To 26
Conc &= Chr(Nos + 96) & NewLine
Next
End Select
Return Conc
End Function
End Class
- The
|
|
|
|
|
Thanks for your reply...
The steps you gave me seems to be a Windows Application step, but now I am doing a Web Application project. Sorry to have confused you as I didn't mention my problem clearly. Anyway, your explanations are very clear to me and comprehensive. If you also know how to do the steps for Web Application, you are always welcomed to offer your help. Let me just redefine my problems here again:
Actually, I created the .DLL files using MATLAB, then I used the Add Reference(in VB.net) to add it to my project, which is a Web Application.
Now, I need to invoke those .DLL to be used, but I do not know what are the steps and codes to be written in my .aspx.vb files to invoke the .DLL files. So, I was wondering how should I code it.
|
|
|
|
|
Hi,
How do I link one library class to another in the same library in VB6 ?
For example,
In XP (and sometimes 2000) there is the Preview 1.0 Type Library(shimgvw.dll) which you can add to the control toolbox. You can then add the control to a form and use it.
The statement: Preview1.ShowFile "C:\Test.tif",1 will display an image file.
Looking in the Object Browser (F2) there are several classes in the PreviewLIB library. The statement above uses the Preview class. There is also a IImgCmdTarget class, which cannot be added to the control toolbox. How can I "link" IImgCmdTarget to Preview so that I can use the extra methods (such as NextPage or Rotate) that it has ?
Steve
|
|
|
|
|
Hi
i want to reference ComCtl32.dll in my VB .NET projects to include windows xp visual styles in my peoject but when im referencing to this DLL this error returns: "This is not a valid assembly or component, only assemblies with extension dll & com components can be refrenced."
is anybody have a soloution for my problem?
thank u so much
Farhad Eftekhari
http://farhad7.com
|
|
|
|
|
|
Thank u so much dear Stewert!!
|
|
|
|
|
I was wondering if anyone knew how I could obtain code to obtain an mp3's bitrate and/or song length (in seconds) info? Thanks.
Bill Dennis
Orlando, FL
|
|
|
|
|
I’m using the SQL Data Adapter to maintain a database. I have a separate set of fields to add records and move the data into a new row structure and then use this code to insert the new record
CompDS1.tblComplainants.AddtblComplainantsRow(newComplainants)
SqlDataAdapter2.Update(CompDS1, "tblComplainants"
After I update the database I remove the data bindings, fill the dataset, and then rebind the fields.
The problem is that the currency manager is incremented by two and the first record can be displayed as a duplicate along with the new row. The count is 3 when it should be only 2 and I’ve tried resetting everything I can find.
If I leave the program and restart it, the count is correct and only the original records and the one I added are present. (The database is also correct, nothing is being duplicated).
I even switched to writing my own insert statements in sql to fix the problem. When I re-fill the dataset to see the added record the original record is still being duplicated.
Any Ideas?
|
|
|
|
|
I created a BMI program. I am having a problem with rounding numbers.
I tried the Double, Constant, and Short. But it still results long numbers.
Can anyone he lp me.
bravo659
|
|
|
|
|
I recently converted a project from VB.NET to C# and discovered that VB.NET has some very entertaining ideas about number rounding. I think though that you're saying you want to control how many digits a floating point number has to the right of the point ? The .Format method will do that for you.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Thannk you for youre reply to my inquiry. I will try it and let you know how it went.
bravo659
|
|
|
|
|
I have question, not related to the problem, but you mentioned in your reply that you are converting a program from VB.Net to C#. Can you please tell me why you made that decision. I am working on this web application using VB.Net. I was thinking about converting to C# but still can't make a decision. What could be the advantages since both are now Object-Oriented.
Thanks for you reply.
|
|
|
|
|
I had to use VB.NET for an ASP.NET job, and I found it to be even worse than I imagined. Yes, both are OO, and both compile to MSIL, however, VB.NET is incredibly ugly, and has some 'features' that are plain astounding. For example, a function will return false, Nothing or 0 ( depending on the return type ) by default. A blank string is the same as Nothing, if you compare them. I was so disgusted that I started a couple of threads on it, and some of the comments I got from people with a background in VB6 included that VB.NET was initially a good design, until all the VB6 users complained about things that had (rightly) been removed. Now, VB.NET adds a lot of syntax to make it possible to use it in a clean way, but very few users know about it, they keep using things like CType and IIf. Another user informed me that the C# MSIL compiler generates more efficient ( i.e. faster ) code. Another told me that any VB6 programmer who was worth anything had moved to C# because of the mess they had to make of VB.NET to keep the legacy coders happy.
In the end, it's obvious that VB.NET is a dead duck. Unlike VB.NET, C# is a new language, designed to be OO, designed to be clean, designed to be a serious language. VB was designed for beginners, and VB.NET carries it's legacy. I don't see why Microsoft need two proprietary languages, and C# is obviously the one they are putting their efforts in to. The gap between C# and VB.NET will grow until VB.NET can be dropped with nary a cry of complaint.
If more reason is needed, just compare how many people are answering C# questions/writing C# articles compared to VB.NET here on CP.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Thanks Chritian.
You are right, even for the .net job openings, people ask for C# and not VB.Net.
|
|
|
|
|
I found the answer, i am using Math.Round to round off the numbers n the BMI project.
bravo659
|
|
|
|
|
Hi,
I have wrote a small VB application that opens up an Excel spread sheet. However when I close my VB application the Excel process is still showing as running in Task Manager. Would you have any idea? Here's the simple code sample:
Private Sub Command1_Click()
Dim XL As Excel.Application
Dim WB As Excel.Workbook
Set XL = CreateObject("Excel.Application")
Set WB = XL.Workbooks.Open("C:\temp\Anyold.xls")
WB.Close False
Set WB = Nothing
XL.Quit
Set XL = Nothing
End
End Sub
|
|
|
|