Replaced not worked for me


When i typed the following code the replace function does not worked can anybody tell me why is this so
Code:
dim str as string = “sample”
str.replace(“sample”,”new”)
and the resulting str value is still “sample”. It doesn’t changes to “new”.

please help if any suggestions!!!!!!!!!!!!!!!

hello friend want to tell you strings themselfves are immutable, meaning you can can’t change them. The output of the Replace method is another string. So your code will no be:

Dim result As String
result = str.Replace(“sample”,”new”)

hope this will remov ur prob…………

variable


hi forum
i tried to create a set of form fields in a loop, hence the id’s were something like: fname1, lname1, city1, fname2, lnam2, city2 etc. Now what i need is to loop through the values so that i can store them in a database.
Anyways of doing this plzz suggest!!!!!!!!!!!
Hi , use the and try the below code hope this as answer to ur prob ,this code will return a Control object that you will need to cast into whatever type control you are dealing with. If the control was not found, it will return null .
the code is as:
ParentControl.FindControl(“fname” + i.ToString())

Array as a Property


hi forum
Is it possible to use an Array as a Property!!!!!!!!!!!!!!!
if yes plzzz tell what code to use!!!!!!!!!!!!!!!!!!

thnx in adv….

hello ,yes it is posssible to use array as property use the code :
Public ReadOnly Property TheArray() As String()
Get
‘… resize and set up your array
Return YourArray
End Get
End Property

Conveting from C# to VB.NET


i am getting problem in converting a piece of code to VB.NET plz give any suggestion if possible
Code:
public partial class ViewCustomers : Page,IViewCustomerView
{
private ViewCustomerPresenter presenter;

protected override void OnInit(EventArgs e)
{
base.OnInit(e);
presenter = new ViewCustomerPresenter(this);
this.customerDropDownList.SelectedIndexChanged += delegate
{
presenter.DisplayCustomerDetails();
};
}

}

give me help!!!!!!!!!1


Hi of the members facined this problem of converting try the below code hope this will be helpful to you:

Private presenter As New ViewCustomerPresenter(Me)

Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
presenter = New ViewCustomerPresenter(Me)
AddHandler DropDownList1.SelectedIndexChanged, AddressOf DDLSelectedIndexChangedHandler
End Sub

Protected Sub DDLSelectedIndexChangedHandler(ByVal sender As Object, ByVal e As System.EventArgs)
presenter.DisplayCustomerDetails()
End Sub

using calculator


hi forum
how can i call calculator,which available in c:windowssystem32calc.exe into my project.sow can i do this !!!!
give the suggestions

hi use the code

dim a as string
a = shell(calc.exe)

code to check file size


helo forum……
How i can check size file. Suppose, if i have some file so if the file greater than 20mb i now wanna archive the file. What the code to check the file size!!!!!!!!!!!!!!!!!!!!!!!!!

hi the code goes like this

Public Function FileSize(ByVal filepath As String) As Long
Dim fi As System.IO.FileInfo = New System.IO.FileInfo(filepath)
Return fi.Length
End Function

but remember this function return will return the size of a file in bytes.

ASP – Active Server Pages


Active Server Pages is a server-side scripting technology which is developed by Microsoft.

With ASP you can create dynamic web pages by putting script code inside your HTML pages. The code is executed by the web server before the page is returned to the browser. Both Visual Basic and JavaScript can be used.

ASP is a standard component in Windows 95,98, 2000, and XP. It can be activated on all computers running Windows.

Many web hosting providers are offering ASP, as it is becoming a more and more popular technology.

You can also avail this facility in the Windows hosting plans of the cpwebhosting.net.

But, Microsoft’s ASP technology runs only on Windows platforms.

However, Chili!Soft ASP is a software product that allows ASP to run on UNIX and some other platforms.

understanding the meaning of the ASP.NET


understanding the meaning of the ASP.NET

The promise of Microsoft’s ASP.NET is that “writing dynamic, high-performance Web applications has never been easier.” That sure sounds good, doesn’t it? But for many non-developer professionals who are involved in one way or another with the Web development process, the devil is in the details of how this is achieved. So here’s a look at how some of the developer jargon translates into everyday language.

System Directory with ASP.NET


How can I find out my System Directory with ASP.NET?

Use this

<%
Response.Write(“The System Directory is ” & System.Environment.SystemDirectory.ToString() )
%>

Which page code model is better


Which page code model is better, single-file or code-behind?

Both models have the same performance.

The choice of using single-file pages versus code-behind pages
depends on your personal preference and convenience.