Jump to content
Xtreme .Net Talk

Robby

Moderators
  • Posts

    3848
  • Joined

  • Last visited

Everything posted by Robby

  1. As Tamer just mentioned; SQL Server Reporting Services is a great reporting tool. I find this to be the best tool out there, you can even import your Access reports into the reporting manager (excluding any code-behind). This book is a great read Professional SQL Server Reporting Services
  2. It's @@IDENTITY, you would do something like this in your stored proc.... declare @myID int SET @myID = 0 INSERT INTO myTable ......your columns here.... SET @myID = @@IDENTITY return @myID
  3. If this is SQL Server and you're inserting using as stored procedure (Which I strongly recommend) then you can get the id with @@Identity (Return this value from the proc)
  4. The simplest way is to check each property and see if it contains CssClass.
  5. I had tested VS2005 on a seperate partition a couple of months ago, fell in love and now it's on a fresh partition along with Win2k3 and many other goodies. (...and 4 hours later, I'm done)
  6. When I saw all these wizard-like functionalities in VS2005, I thought the same thing. This will probably bring more programmers into the .NET world but not developers, developers still require experience and expertise, but then again many employers don't really care - as long as they can save a buck. :) I guess time will tell.
  7. You can Copy the entire dataset or one of its tables into another.
  8. Instead of creating the string as a literal you can add the control as an asp control Dim myRadio as new radioButton myPanel.Controls.Add(myRadio) myRadio.Attibutes.Add("OnClick", "javascript:toggle('YES','radGrantAllPermissions');") myRadio.ID = "Radio1" Then to find the control.... Dim myRadio as new radiobutton myRadio = DirectCast( myPanel.FindControls("Radio1"),RadioButton) If not myRadio is nothing then 'do something with the radio button else 'we did not find the control end if
  9. I would've hoped that they would've done away with Modules in vb.net but that's not the case. I don't think there is an equivalant in C#. Thank god.
  10. The code in my last reply will INSERT a new row into your database. From your first post it seems that you already know how to bind your datagrid to a database. I don't understand what you're stuck on at this time.
  11. This is as simple as it gets... Private Function ExecuteNonQuery(ByVal sql As String) As String Dim con As New OleDbConnection(ConnectString()) con.Open() Try Dim cmd As New OleDbCommand( sql, con) Dim affected As Integer affected = cmd.ExecuteNonQuery() Return "Records affected " & affected.ToString Catch ex As Exception Return "Error occured" Finally con.Close() End Try End Function
  12. An Update cmd needs a Where clause, in a sense you need to pin-point the exact record to update, Is this what you are currently doing? If the record already exists, is this not what you want? To update an existing record.
  13. This may explain things a bit further ( but not much) http://www.xtremedotnettalk.com/showthread.php?threadid=78714 You can also read some of these articles http://www.google.com/search?hl=en&lr=&ie=UTF-8&newwindow=1&q=DAL+vb.net+article&btnG=Search
  14. As I stated in my previous reply, you should avoid hitting the database more times then needed, you can apply the RowFilter without the rest of the code. Give it shot.
  15. First off it's useless to check for IsPostBack in the Button click event because it will always be a post back. You should be doing the hit to the database in your page load event the first time only (If Not IsPostBack Then). The other thing you should do is create a variable of type Dataview at the top of the page. something like this.... Private dv as DataView Then do something like this with our existing code... dv = ds.Tables(0).DefaultView DataGridMaster.DataSource = dv DataGridMaster.DataBind() You can save the dv to the session object, then in the button click do this... dv.rowfilter = "Surname = '" & txtSurname.Text & "'"
  16. You need to add your dropDown to a "<asp:TemplateColumn>" tag and if you want it only whilst in edit mode then also use <EditItemTemplate> tags
  17. Robby

    images

    To browse for files use System.Web.UI.HtmlControls.HtmlInputFile, this will create the tag <INPUT TYPE=�file� />. Here's an article of use...http://www.codeproject.com/aspnet/fileupload.asp Keep in mind that in the long run you're better off saving the image to disk and only saving the path of the image to the database.
  18. You can use an Insert Into statement with the ExecuteNonQuery method of the Command object. Btw, I would not consider DictionaryDAL class to be a true DAL because you have a Select statement in there. A DAL should not have any knowledge of any specific tables, the Select statement should be in a Business layer. Just something to think about.
  19. Do you mean the footer that prints on IE or on your web page?
  20. Is this ASP.NET ?
  21. Look into Strongly Typed Datasets http://www.google.com/search?sourceid=navclient&ie=UTF-8&q=strongly+typed+dataset
  22. For her age yeah.
  23. My IT guy called MS regarding this issue because the same thing happened yesterday to our Beta server, they said that simply changing the read-only property of the JS files (WebUIValidation.js, SmartNav.js) would do the trick, I find this hard to believe. If I have time I'll test it out.
  24. <hr> is a Horizontal Line There are no vertical lines controls but I guess you can make your own using the left or right border of another control like a panel, table or label.
×
×
  • Create New...