Jump to content
Xtreme .Net Talk

tonyf

Avatar/Signature
  • Posts

    26
  • Joined

  • Last visited

About tonyf

  • Birthday 09/01/1973

Personal Information

  • Occupation
    Systems Developer
  • Visual Studio .NET Version
    Visual Studio.NET Enterprise Architect
  • .NET Preferred Language
    VB.NET, ASP.NET

tonyf's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Yes you can do this easily by adding an Image Button.
  2. tonyf

    ASP Moving

    Set SmartNavigation in the document properties to True
  3. Baically you can't!! When using the edit feature of the datagrid, you would notmally use a textbox. combo, checkbox etc to edit the required data for that particular row. The only other possible way would be some sort of javascript, but that would seem a bit overkill!!
  4. Not really sure if there is a web site other than maybe looking on Microsoft.com. Because I studied for the MCSD.NET Qualification I have all the official course material so I used that.
  5. tonyf

    import dll

    Assuming you have the documentation to the properties and methods of the 3rd party dll, just use the references in the solution explorer to reference the dll in your project, then dim a variable of the class you want to use.
  6. Your posting on a .NET board so your probably better going the Microsoft Route. I passed the Microsoft .NET Solution Architecture exam last year and have to say that UML is the preferred language. The best methodology is probably the Microsoft Solutions Framework (MSF) Process Model. I only say this as it's the one I have looked into most with taking all the .NET exams etc. As for the preferred case tool, then I use Visio, as if you have the Solutions Architect version of Visual Studio.NET then you get this software as part of the package. Hope that helps.
  7. I think the problems is this line: Dim imgSign As Image = New Image Remember that by saying New Image you are creating 1 new image. Therefore you need to say imgSign = new Image inside your loops before you do the controls.add(imgSign). Thats the reason you are only getting the last image because you overwrite the variable everytime, therefore the imgSign object is only ever the last one. Hope that helps!!
  8. Yes you can do this in code. First build the HTML table using: Protected WithEvents mytable As system.Web.UI.HtmlControls.HtmlTable Now what you need to do is build your rows and columns of the table: dim row1 as New HtmlTableRow dim col1 as New HtmlTableCell dim col2 as New HtmlTableCell dim col3 as New HtmlTableCell etc etc Now you can reference all the elements of the table using the declared objects. e.g. to add some text to the second column, just enter something like: col2.innerHTML = "This is a test" you can even change other parameters like vertical aligning the cell and changing the CSS Style for that cell etc: col2.VAlign = "top" col2.Attributes.Add("Class", "mystyle") The specific issue you had when trying to add asp.net controls into this table is just as easy. If you wanted to add an asp.net textbox to column 3 just type: Dim dg As New TextBox col3.Controls.Add(dg) Once you have built all the required columns and rows, you must add the columns to the cells collection and the rows to the rows collection of the table as below: row1.Cells.Add(col1) row1.Cells.Add(col2) row1.Cells.Add(col3) mytable.Rows.Add(row1) That's about it!! tr.Cells.Add(tc(0))
  9. tonyf

    MSaccess

  10. This is a known problem with modal popup windows. I found that this resolved the problem for me. Put the following in the head section of the html: <META http-equiv=Pragma content=no-cache> <META http-equiv=Expires content=-1> Now you would think that the above (which states that the page should never cache) would work!! well it doesn't. The reason it doesn't work is that IE uses a 64kb buffer and once this is full, it clears with the above meta tags. The problem is, because the meta tags are in the head, there is no data in the page cache when IE reads these lines, therefore, the page is cached as normal. damn thing!!! To resolve this, leave the above meta tags in the head section but also add the following code to the bottom of the page: <head> <META http-equiv=Pragma content=no-cache> <META http-equiv=Expires content=-1> </head> Yes, I know that seems strange, but believe me, it works!! The only problem with having two head sections in the html is that some designers (I use visual studio.net) now wont allow you to view the design, so if you do need to view the page design, comment these lines out, change the design, then remove the comments and save. Sorted!!!
  11. If you put the code that binds the listbox to the data inside the postback e.g. if not page.ispostback then listbox.databind end if This way, your listbox will only get populated the once, regardless.
  12. you could also just use a datareader to make things a bit quicker. datareader.read: Label1.Text = datareader(0) datareader.read: Label2.Text = datareader(0) datareader.read: Label3.Text = datareader(0) just an alternative!!
  13. In my previous example, you just need to assign the text property of the label to the relevant fiend in the datatable/dataset etc e.g. If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then Dim lb As Label lb = CType(e.Item.FindControl("Label1"), Label) lb.Text = dataset.tables(0).rows(e.item.itemindex)("field name etc").tostring End If If you need to know the exact coding then post your code here!!
  14. Using the itemdatabound event: Obviously you have created your template in the datalist. So say you have added a label named "label1" to your item template. In the itemdataboundevent you would type the following code: If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then Dim lb As Label lb = CType(e.Item.FindControl("Label1"), Label) lb.Text = "whatever you want to put here" End If The lb now relates to the label in your datalist template, so if you wanted to assign it the value from the database then just add the reference from the table required etc.
  15. Not sure exactly what your trying to do but I have developed a web form before with over 100 textboxes on it. I just created the textboxes on the fly, positioned them and then databound them. It was easier that way than creating 100 textboxes. It was a slightly different problem than yours though as my textboxes increase and are now upto about 200!!! :eek:
×
×
  • Create New...