Search results for query: *

  1. kulrom

    Question Listbox to display multiple rows of records from SQL Server database

    Dim table As New DataTable table.Load(sqlCmd.ExecuteReader) ListBox1.DataSource = table ListBox1.DataBind()
  2. kulrom

    Question Listbox to display multiple rows of records from SQL Server database

    Just change this: sqlReader = sqlCmd.ExecuteReader() If (sqlReader.HasRows) Then While (sqlReader.Read()) 'This grabs the details for the specific centre from the database using the data reader. ListBox1.DataSource = sqlReader ListBox1.DataBind() EndWhile to this: Dim table As New...
  3. kulrom

    Question Retrieve client file content

    Well that is not possible by default. Rather you have to create a virtual directory in IIS for the folder which is not in the scope of your website. Then you will be able to access the files inside that folder.
  4. kulrom

    Question Retrieve client file content

    Try something like this (please be aware that test.txt needs to be located somewhere into the web app): Dim MyTestFile As String = IO.Path.Combine(Server.MapPath("~", "test.txt") If IO.File.Exists(MyTestFile ) Then Dim sr As New StreamReader(MyTestFile ) TextBox1.Text =...
  5. kulrom

    Question Retrieve client file content

    It's all the same Hugo. You can read the content of the txt file no matter how it has been created. Please give it a try. If any problems do not hesitate to reply here. Welcome to the forum :)
  6. kulrom

    DropDownList is not displaying items on run time!

    Ha it's because you've only pasted the converted code and it was not wired to the Load event. That's why it worked for me. C# code differs in that sense. Ok i am glad you have it working there.
  7. kulrom

    DropDownList is not displaying items on run time!

    Actually it works for me too. When i run the project the dropdownlist is populated correctly. However you should first ADD the Dictionary items and then use Insert method e.g. RegionList.Items.Insert(0, new ListItem("---Please select---", "0"))
  8. kulrom

    Question Confirm before insert in a DetailView

    Well you can reference the Insert button using the FindControl method from DetailsView e.g. Dim InsertButton As LinkButton = CType(Me.DetailsView1.FindControl("MyInsertButton"), LinkButton) InsertButton.Attributes.Add("onclick", "javascripthere") However, i would suggest to use template for...
  9. kulrom

    Question "Expert Settings"

    It is available only if you have installed the XNA Game Studio. Expert Settings
  10. kulrom

    DropDownList is not displaying items on run time!

    This code works fine for me. Maybe you expect something else? Please explain further.
  11. kulrom

    Question Confirm before insert in a DetailView

    Just add this code to the button TAG(s) and it will work: OnClientClick="return confirm('Do you really want to insert this data?')" So now, a pop up will come up with the Question. If they hit Ok, the page will post back and save the information, if they hit cancel, the form will be not submitted.
  12. kulrom

    Question sending a link in an email

    You should have some extra double quotes in VB.NET e.g. Dim StrLink As String = "<a href="""http://domain.com/Page.aspx?param=123""">Anchor Text</a>"
  13. kulrom

    SQL Data Reader

    Hey i am trying to help you while You are trying to be funny. And again it does not work. At least it does not work in a way you explained that you want it to work. However if you are happy with that then i have no reason to insist. It works woohooo .. cool
  14. kulrom

    SQL Data Reader

    This cannot work. reader(index) refer the column in the query not the record number. reader(0).ToString is the way to go
  15. kulrom

    SQL Data Reader

    I am really confused. what is this? You code against a database (MSSQL) so what is this html code?
  16. kulrom

    SQL Data Reader

    Your sql command text does select ONLY ONE column which is ID. Therefor you cannot refer index 1 (please notice that .NET is zero based) unless you change the query e.g. Dim command As New SqlCommand("SELECT id, username FROM dbo.users", FLogin.con) now your code will work AS IS. and the...
  17. kulrom

    SQL Data Reader

    It's obvious. You do not have a column on index 1 as you only select ID column. Change the index to zero and it will work: While reader.Read MessageBox.Show(reader(0).ToString) End While
  18. kulrom

    Question Singing the Environment.NewLine to <br /> blues

    I can't see your code so i am going to guess that you are doing something wrong there. To solve this you can use one of the two methods available: Dim anexample As String = "blah blah" & Environment.NewLine Dim tobesaved1 As String = anexample.Replace(Environment.NewLine, "< br / >") ' Or...
  19. kulrom

    Comboxes + Date?

    Dim day As String = dobDayComb.SelectedItem.ToString Dim month As String = dobMonthComb.SelectedItem.ToString Dim year As String = dobYearComb.SelectedItem.ToString Dim myDate As New Date(year, month, day) myCommand.CommandText = "INSERT INTO table(dob)...
  20. kulrom

    Question Looking for installation?

    Microsoft Express Downloads - Visual Studio Express and SQL Server Express Install Visual Basic 2010 Express is first in the list. Just select the language and voila.
Back
Top