vb.net

Making a website/project Portable

Good evening/morning/after/noon. I have an ASP.net 3.5 website and I am using vb.net in VWD 2008 Express, I am also using MS SQL Server 2008 Express, I used ajax tabs and a textBox charavters counter control develped by http://www.4guysfromrolla.com/ The database is attached with MS SQL Server Management Studio Express and the files are...

RowDataBound function of GridView

I have a DataTable that contains 3 fields: ACount, BCount and DCount. If ACount < 0 then I need to display 'S' in one of the columns of the GridView. If ACount > 0 then I have to display 'D' in that column(in label). Same thing with BCount and DCount. How can I do this conditional check in the RowDataBound function? ...

How to redirect to another page onclicking on button in gridview along with parameters

I have button in one of the columns in a gridview. On clicking on a button I need to redirect to another page along with parameters to another page. Can anybody help with this? ...

Retriggering a VB subroutine, how to serialize execution?

Sorry if this is a newbie question. I have a VB.NET subroutine that is triggered by a timer. I have found that on occasion, if the routine runs for a long time, the routine will be triggered again while it is still running with unpredictable results. Is this normal? Is each copy of the routine running in its own thread? Is there a way t...

How to redirect to another page on clicking on button in gridview

Duplicate of How to redirect to another page onclicking on button in gridview along with parameters hi guys, I have a gridview with button in one column.I want to redirect to another page along with parameters on clicking on button.Is there any option to do this in rowdatabound event in gridview.If there is any other option can ...

How can I get the DataKeyNames in aspx in codebehind?

Hi, I need to get the DataKeyNames in codebehind of my ASP.NET application (VB.NET). How can I get that? ...

Making a website/project Portable - Check List

Good evening/morning/after/noon. I have an ASP.net 3.5 website and I am using vb.net in VWD 2008 Express, I am also using MS SQL Server 2008 Express, I used ajax tabs and a textBox characters counter control developed by http://www.4guysfromrolla.com/ The database is attached with MS SQL Server Management Studio Express and the files ar...

How do I access the variables from urls that come from the GET method in ASP.net?

Asp.net has turned out to be alot easier to use than PHP (so far). However, I have been searching for a while and simply cannot figure this out. How do I get the variables that are contained in the url of my page (that originate from a form that had the method "GET") and utilize them? For example, my page would be www.example.com/index....

Get resource file inside the application...

Hello, i was wondering if i could access a folder inside the Resources folder of the application? i would make it to eliminate the use of the debug directory in storing files and to use the clickonce deployment. I need your advices and suggestions. Thank you. ...

What is the best way to stop developers from calling System.Windows.Forms.Application.DoEvents() ?

We just spent 300 man-hours fixing a buggy application in the field. It all came down to calling Application.DoEvents (re-entrancy problem). This was not caught in design reviews, code reviews. The code was inserted two years ago with the first version; the application was always "flaky" but recent changes exposed the re-entrancy proble...

Redim is only removing data, not removing nodes.

So I am quite confused. I have a public string() array defined, and each time a timer_tick event gets triggered, I loop through the array and visit web pages contained in the array. for i = 0 to UrlList.Count - 1 ' Do stuff WebBrowser.Navigate(urllist(i)) While WeBbrowser.ReadyState <> WebBrowserReadyState.Complete Applica...

Find Packet Loss and Trace Route in .NET

Hello All: I am trying to code to capture the packet loss on computers, but the only way I've been able to do so was to run the NetStat.exe and the TraceRt.exe processes and capture them to a listbox (using the code below): Private Sub myProcess() Dim p As System.Diagnostics.Process Dim theFile, sTemp, sLineOut, mySent, myRetr...

Refreshing a SQL database connection

How do you refresh a database connection within a VB application to SQL Server 2005 so that whenever data is changed in SQL, such changes are picked up by the application? For now the application only picks up the changes after it has been restarted, and that is not what I want. ...

How do I unit test private functions from a separate project in VB .NET?

As I develop code, I often want to unit test some of the building blocks of a class even if they are normally private. If my unit tests are inside the project, I can use "Friend" to accomplish this and still keep the functions private for normal use. But I would rather move my NUnit tests into their own separate project(s). How do I achi...

In VB.NET, can I mark a function as deprecated?

Hi, Is there an ability in VB.NET to deprecate code? I know that in C# there are 'attributes', and tags in java; is there anything similar in VB.NET, other than leaving a 'todo:...? ...

Server Error

Hi In my Project (ASP.NET,VB.NET ),some times Server Error is showing. When this error is shown ,Users cannot submit their Applications,so that they have to re-type full details and submit again.How can I escape from these Server Errors. I think the reason may be Memmory issues.Because if the user try to submit again(after Sign Out->Sig...

How can i pass a null value for date in vb.net to sql stored procedure?

Hi guys, My application is asp.net with vb. In my page I have a textbox for passing date. If I didn't enter date and on clicking submit, I have to pass null value to the stored procedure. I tried following codes such as DBNull.Value and DateTime.MinValue. In that case instead of null ,"#12:00:00#" is passing. I have to pass Null. So can...

WPF Event firing twice

I've created a simple WPF User Control Library. In this project there's a single class UserControl1. I've a Canvas on this control called Canvas1. The code for this class is given below. Class UserControl1 Public Sub Draw() Dim t As New TextBox t.Text = "Whatever" t.Name = "t" t.RenderTransform = New TranslateTransfor...

Error while redirecting to another page-Confirm Form Resubmission Error

I have a page named a.aspx and clicking on the submit button i redirected to b.aspx with one parameter named fileid. On clicking on back button from b.aspx i have to go to a.aspx.But now on clicking back button, i got one error as follows Confirm Form Resubmission This web page requires data that you entered earlier in order ...

.NET scripting

Can anyone provide an example of .NET scripting? Some dynamic languages support functions like eval() or compile() than let you compile and execute a string in run-time. VBCodeProvider seems to be a related namespace, but i can't find an example showing how to compile and execute code. Edit: I'm developing a ASP.NET site using VB.N...