How to define the ActionLink in VB.NET ?
ActionLinks This Image shows type-safe method of defining the Actionlinks ,how to define it in VB.NET ...
ActionLinks This Image shows type-safe method of defining the Actionlinks ,how to define it in VB.NET ...
I have an ASP.NET 3.5 page with some AJAX, some Validators and some business-rule validation done in the code-behind page (VB.NET). The Validators set focus to the 'offending' control when an error is detected. When a business rule is violated, I used the following code to generate some javascript "on the fly" and execute it to simul...
I am having a problem with a unit test I have created. First time doing this so I am not sure why I am getting this error <DeploymentItem("ETDS.exe")> <DataSource("System.Data.SqlClient", "Data Source=Foo;Initial Catalog=FooDB;Integrated Security=True", "User_Names", DataAccessMethod.Sequential)> <TestMethod()> _ Public Sub ValidateUser...
Hello, I'm writing a custom user control for my asp.net site, for storing datetimes. It has two properties: Private _includeTime As Boolean Private _value As DateTime = Nothing Public Property IncludeTime() As Boolean Get Return _includeTime End Get Set(ByVal value As Boolean) ...
Hi,i got an error while loading a page in asp.net.I have renamed the page before loading it.The error is as follows:- **could not read state "obj\Debug\ResolveAssemblyReference.cache"** Please help ...
hi guys, I have to increase timeout period.Following is my code. Private Function GetConnectionInstance() As SqlConnection Dim objConn As SqlConnection Dim strConnection As String strConnection = ConfigurationSettings.AppSettings("conn") Try objConn = New SqlConnection(strConnection) Catch ex As Exception ...
I remember that to set expectations on methods that return void in C# one has to write: mockedRepository.Expect(() => mr.AddUser(someUser)).DoOtherStuff() where AddUser returns void. How to achieve the same in VB.NET? EDIT: I've found similar question. May be helpful: How to mock a method with Rhino Mocks in VB.NET . ...
hi Experts, Can anyone pls throw light on this error ? An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in STUB_CREATOR.exe Additional information: Exception from HRESULT: 0x800A0036 (CTL_E_BADFILEMODE) This is the line that creates the error Dim f As New Scripting.FileSystemObject starter = f.O...
hi.... In a form(File.aspx) i am generating another popup window (Lookup.aspx including a DataGrid). From that datagrid i can fill the textbox in File.aspx using javascript.It works in InternetExplorer7 & InternetExplorer8 .But in Morzilla the popup & datagrid is appearing,but i can't select from datagrid . In same manner a calendar ...
Suppose I want to write a function like the following (as usual, a trivial example for illustrative purposes): Public Function calcSqSum(Of T)(ByVal list As IEnumerable(Of T)) As T Dim sumSq As T For Each item As T In list sumSq += (item * item) Next Return sumSq End Function As you can probably guess, this f...
If you have custom type, and you wish to assign a List(of T) to that custom type, how do you do so in vb? I found a C# example as below List<myclass> result = (from c in db.Customers where c.orders.count > 1 Select new Myclass { Id = c.customerID, Name = c.contactname }).Tolist(); From this site http://blogs.msdn.com/swiss_dpe_team/a...
I'm teaching some .Net classes and want to give the students some good books to read during and after the class. Some will prefer VB and other will like C# so the books need to give examples in both languages. I need one book each for these classes: Intro to .Net (Windows apps and ASP.NET together) Intermediate/advanced Windows apps ...
I have a Web Forms textbox in a gridview and I want to higlight the text on a button click. textbox.select(start,end) doesn't work. Here is the code: Dim row As GridViewRow = TryCast(DirectCast(sender, ImageButton).Parent.Parent, GridViewRow) Dim txtdays As TextBox = row.Cells(2).FindControl("txtDays") Dim lbldays As Label =...
hello, i am having an awful time with axspreadsheet for vb.net 2008. the simplest example is i just add the control to the form. it compiles on one computer, but it doesnt compile on any other computer. i may be missing a reference or a prerequisite but i have searched for about 10 hours, and i have not gotten any insight into this. than...
I don't believe this is possible by conventional methods, but something like this verbose code: For Each s As String In myStringList Step -1 //' Do stuff here Next I will probably have to invert the myString object before a conventional For..Each Loop, correct? ...
This code giving me fits. Returns the error: The given ColumnName 'COURSENAME' does not match up with any column in data source. If I remove the mappings, nothing gets written to the db either. Help! Dim connectionString As String = "Data Source=2UA72518QY\SQLEXPRESS;Integrated Security=True;Pooling=False;Initial Catalog='Foo_Con...
What I need to do is query an iTextSharp AcroField to check if it is rotated, and if so capture the value of the rotation. So If I have the following field: Dim af As iTextSharp.text.pdf.AcroFields = stamper.AcroFields Dim afi As iTextSharp.text.pdf.AcroFields.Item afi = af.GetFieldItem("fieldName") What do I need to do to get the ...
I have a fairly simple desktop application that uses a .NET setup project (.msi file) to perform the installation. On the first installation, everything proceeds in a timely fashion with good feedback for the user. The problem occurs when the user is installing the latest version of the application over an old version on their machine....
I know this will be easy, but I can't seem to find it anywhere. How do you SET the current row in a gridview? I find tons of ways to get data from it, but I what to set a current row or cell programatically. I'm using VB 2008 express. I also find lots of promising properties like Selected... but these are all read only and i can't se...
I have written a program in VB.NET 2008 Express that references a .NET managed dll. I simply added a reference to the dll to the project. I then 'Imports' the dll at the beginning of the program and then can use it. Everything works fine when I am running the program in debug mode (and it uses the dll as intended), but as soon as I go to...