I didn't find any answer on web with vb.net (I find millions of samples with c#)
I translated a sample controller to vb.net but doesn't upload
My ResimController.vb
<AcceptVerbs(HttpVerbs.Post)>
Public Function Anasayfa(ByVal forms As FormCollection) As ActionResult
Dim errors As Boolean = False
If String.IsNullOrEmpty(forms(...
Hi,
Every time i enter set of values like Group Name,Group Abbreviation,URL in the text boxes and click the save button automatically its saves in the database and for each set of values a new details view has to be generated dynamically with a web panel and the header of the web panel should have the value of Group Name.
Example:
Gr...
I have this method:
Private Sub SetIfNotNull(ByVal input As Object, ByRef destination As Object, ByVal ConversionType As ConversionType)
If input IsNot Nothing AndAlso input <> "" Then
Select Case ConversionType
Case DealerTrackConnection.ConversionType._String
destination = input
...
Hello,
I am trying to print the contents of a structure onto a print page in Visual Basic(visual studio 2008). However my for each loop generates a conversion error? Could someone help me figure out whats wrong? Thanks
Public Class Form1
Structure IncomeRecord
Dim IDVal As Integer
Dim HouseholdNum As Integer
Dim YearlyInco...
The following code is designer generated:
Me.lblXRay.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
What's the 8.0! mean?
...
I'm not sure how to make concatenate inside a loop in the same way as this:
For x As Integer = 1 to 10
Me.Button & x & .top = 0
Next
instead of:
Me.Button1.top = 0
...
Me.Button10.top = 0
Any suggestions would be much appreciated,
Thanks :)
...
Within my application i have a PUBLIC customer class...
Public Class Customer
Public Name As String
Public Surname As String
End Class
Then i decided to use LINQ to SQL within my application.
After adding the MyDatabase.dbml class, errors showed up since LINQ creates public properties too
<Column(Storage:="_Name", DbType:="NV...
I have a simple user control which wraps some logic around an AutoCompleteBox. This question could apply to any ItemsControl control like a dropdown or listbox though.
<UserControl>
<Grid Background="White">
<sdk:AutoCompleteBox Name="myACB" ItemsSource="{Binding myData}" />
</Grid>
</UserControl>
I want expose the Sel...
As the title says. From what I can see online the Overloads keyword is optional but is there ever a time when it is necessary? It even seems to be an error when used in a Module.
...
I am creating an xml file with LINQ as follows...
Public Sub CreateXml()
Dim db As New MDataContext
Dim Customers = <gallery columns="3" rows="3">
<%= From customer In db.Customers _
Select <customer>
<name><%= custo...
Following up on my question yesterday to deepcopy an object with events in C# and attach the events of the original object to the Cloned copy is pretty easy, you just set the Event declaration in the Copy = the value in the original. Deep Clone when events are attached
How do you do this in VB.Net? (Using .Net 2)
I was hoping maybe the...
Hello all! First time posting. :)
I'm a pretty new developer so I'm not well versed in common ASP.NET problems.
As a test, my boss asked me to convert a (not very critical) ASP.NET site from 1.1 to 4.0. Well, it's not extremely difficult and things are going well so far. However, I've hit a small snag. I keep getting a NullReferenc...
I am using this code, I got it to work fine with any C# assembly that allows it to be ran from memory. Is there anyway I could get it to work with VB.net?
private static void RunFromMemory()
{
try
{
byte[] bytes;
using (WebClient client = new WebClient())
{
byte...
I need to create a namespace for my database class file, so I can call the database procedures within my webservice module. How can I create a namespace to call that Db class file?
...
Simple function: Check if a webserver returns a non-200 HTTP status.
Private Function RemoteFileOk(ByVal Url As String) As Boolean
Dim req As HttpWebRequest = TryCast(WebRequest.Create(Url), HttpWebRequest)
req.Method = "HEAD"
Dim rsp As HttpWebResponse = TryCast(req.GetResponse(), HttpWebResponse)
Return (rsp.StatusCode = Http...
I want to declare a variable to hold the query result from LINQ to SQL like to the following:
Dim query As IQueryable(Of Student)
If isNoUserName Then
query = From st In db.Students _
Order By st.AssignedId Ascending _
Where (st.studentId = studentId _
Select st
Else...
Can anyone help me on how can I fix this one.
I'm using vb.net 2003 and I've tried to generate a report in Excel using POI, but I have a problem when the records is above 2000, cell formats has been missing or corrupted for the next 2000 and above records. And when I'm opening the generated report and It shows a message of "To many diff...
Hi,
Can anybody tell me how to create a Form in VBA that has two text boxes that when filled append a text file.
Lets say that the user types CHICKENS in textbox1 and EGGS in textbox2 then I want a sentence generated in the associated .txt file that says:
Don’t count your CHICKENS before your EGGS hatch.
Then if the user would decide...
Hi,
I am using source safe to maintaine my code.
Recently I copied my code to another machine.
But everytime i build my project i am getting below error:
Problem generating manifest. Could not load file or assembly 'D:\WorkingFolder\Project\SubFolder\obj\Release\SubFolder.exe.manifest' or one of its dependencies. An attempt was made t...
Here's my code
I seem to be getting an error SQL command cannot be converted to string with this code
Dim LogData2 As sterm.markdata = New sterm.markdata()
Dim query As New SqlCommand("Select * from openquery (db, 'SELECT * FROM table WHERE person=@person')")
query.Parameters.AddWithValue("@person", Session("number"))
Dim drCode2a A...