I'd like to get both C# and VB.NET sugestion.
I have an ASP.NET FileUpload control, which allows only image type. I used RegularExpressionValidator like below.
<asp:FileUpload ID="fuPhoto" runat="server" TabIndex="40" />
<asp:RegularExpressionValidator ID="RegularExpressionValidator3"
runa...
String s = "test";
String is a class, so to use it we should create an object of it. But rather we just make a reference of it and give it a value. How is it possible and what concepts are used in it.
The metadata of String class shows the following :
public sealed class String : IComparable, ICloneable, IConvertible,
IComparable<st...
I can quickly knock together soem code to xlate base 10 to/from bae 13, but I just wondered if something very easy already exists in VB.NET (or even somethign generic, with base N, but right now I am only looking at base 13)
...
Is it possible to have an argument of any type? Here's what i mean:
some_function(argument)
if (argument type is string)
do something with a string
else if (argument type is datarow)
do something with a data row
...
I've found something about generics, but i'm not sure if it's what i want.
...
Hello,
I'm trying to use reflection to get the instance of a class in vb.net. I have a class 'A' in my web project and to test it, i create a new aspx page and try to write the following:
Dim t as Type = Type.GetType("A")
This returns "Nothing". But if i do this:
Dim inst as A = new A()
Dim t as Type = inst.GetType()
t's type is "...
I have a BaseClass, a DerivedClass1 and a DerivedClass2 from a third party library. DerivedClass1 and DerivedClass2 both inherit from BaseClass.
There's a ContainerClass, from the same library, with a member variable ActiveItem, which can be of DerivedClass1 or DerivedClass2, so it is declared as BaseClass.
I want to know if ActiveItem...
Dear All,
I have a stored procedure in SQL Server for generating transaction numbers.
Can anyone help me with how to call the Stored Procedure from VB.NET and how will i get the value that is returned from the procedure into the front end.
Regards,
George
...
I have an web application of 200 web pages and all has a single master page. Most of the content pages use AJAX controls so most of content pages has its own ScriptManager. Now I have a requirement to add a link with HoverMenuExtender control and for that I need to put ScriptManager in the Master page, but it is working only in the conte...
I am using linq over dataset have multiple columns and grouping on one column with this code:
Dim Groups = From n In data _
Group n By s = n.Field(Of String)("name") Into Group Select s
but it results in only the first row and I checked the data it's supposed to return 13 rows.
...
I am calling my business layer project in Web Project. I added refress business layer project to Web. When I call class in BL project, I need to write twice this namespace. I dont know why it is coming.
MyCompanyName.HRHead.DataLayer.MyCompanyName.HRHead.DataLayer.User
I suppose to call
MyCompanyName.HRHead.DataLayer.User
In my BL...
I am attempting to inherit an ASP.NET RegularExpressionValidator and add some functionality to it. I inherited the control and added my custom properties. However, I would also like the client-side functionality to call a different JavaScript function.
In order to do that, I will need to supress what is happening in the AddAttributesToR...
Looking for something like:
dim rect as system.drawing.rectangle
For each point in rect
Debug.print(point.name, point.value)
Next
...
I have a DataGridView and have the AutoGenerateColumns property set to false, but the when I build my project the columns are Auto Generated.
I can see the property set to false in the Designer.vb code for the Form.
I've had this problem before and I'm not sure how to fix it.
Any advise would be greatly appreciated.
Thanks.
...
How to create HTML fieldset and legend in asp.net code behind? and add controls in that fieldset?
...
Dear All,
Can anyone please help me on the following:
I have created a SQL Server stored procedure as follows:
create procedure prcGet_sub_menu_list
@sub_menu char(5)
as
begin
select
'menu_code' = menu_code
'menu_name' = menu_name
from sub_menu_master
where menu_code = ...
I'm starting to put in a database into my application, however I'm drawing a blank on how to share a database connection among the dozen or so different forms in my MDI application. I'm assuming this has to do with interfaces or something but I can't find any relevant examples anywhere. Can someone help me out? Ideally what I'd like is w...
i wanna a create a project with one .exe file and remaining files as .dll. i have 24 forms in my windows application. am using Vb.net
...
I'm using a reportviewer in VB.NET.
When the user exports a report to Excel some of the columns get merged and hidden. is it possible to fix this?
Maybe by manipulating some code or a setting somewhere..?
...
I have a design question about parsing data in Silverlight. I need to allow my users to validate their csv data (they paste ten rows into a textblock), but I am not sure if I should attempt to do it on the client side where I don't have access to the textfileparser class or send the data to a webservice for validation. If I send it to ...
First, let me ask you to consider this as a real question, and not a subjective one.
That out of the way, here's my situation: We are looking to port our existing classic ASP application to .NET, but we're unsure of what language to use for the new app.
I personally would 'prefer' C#, as I'm more familiar and comfortable with that lan...