Search results

  1. T

    Looping through the data in database

    Hi, i have a problem with looping through the data in database. I have two tables namely question and answer table. In question tables, I had qnsID, StemID, stem(which is the question text), AnsID(took it from answer table). In answer table, i had AnsID, stemID, option. I will select one...
  2. T

    Open new window from image button

    Hi, thank for your reply. I had chnaged the sentance to this: image1.Attributes.Add("onClick", "<script>window.open" & "('h_viewTest.aspx','_new', 'width=400,height=200');</script>") But there is no new window popping out. Is this corect? tiffany.
  3. T

    Open new window from image button

    Hi, can i know how to open new window from image button in a datagrid? Currently, i had this codes for html page: <asp:TemplateColumn HeaderText="Image"> <ItemTemplate> <asp:ImageButton Width="150" Height="125" CommandName="Select" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "pic") %>'...
  4. T

    Problem contacting with web server.

    I have problem opening the three tier project. It successfully open data layer but when it trying to contact with the web server to open the web service layer, it just can't load. What is the porblem over here? I didn't touch any setting of VS.NET or IIS. It work perfectly fine in the...
  5. T

    Error msg prompt when check for the userId and display the linkbutton in datagrid.

    Hi, i have this idea on the codes to check whether the userID is match with teh userID in the datagrid. If it is match, the linkbutton in datagrid visibility is true. Else false. But for the following codes, i try doing it when hte userID is match, the button visibility will be false...
  6. T

    Problem updating to databse from textbox.

    Hi, I'm having a problem on updating the value to database from textbox. Initally, there is a textbox for display the retrieve valur from database. This textbox can be edit and update to the database. However, when this textbox has something retrieve and display it can't update to database. If...
  7. T

    Paging problem

    Hi it me again. Soory for so many posts, as i'ma newbie so please bear with me. i had did soem codes for the paging in the datagrid. Here is the code in presentation page: In pageLoad: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load...
  8. T

    Select data from database and display in textbox

    I had try another method to do it but it still not perfectly done. I use Session to select from the datagrid then display in the textboxes in the nest webform. 'This is the datagrid where i need to retrieve the data from here. In adata cell i had contain more then 1 dataitem. Private Sub...
  9. T

    Select data from database and display in textbox

    Hi, i'm having a porb on how to select the data from database and display in the textbox. i had use the sql like this to select the data: Public Function displayEditMsg(ByVal userName As String, ByVal strname As String) As Dataset Dim ds As New DataSet Dim da As New SqlDataAdapter("SELECT msg...
  10. T

    Button in datagrid display if it is a member

    Hi, the above codes cannot work so i come out with new codes. Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DataGrid1.ItemDataBound Dim btn As System.Web.UI.WebControls.LinkButton =...
  11. T

    Button in datagrid display if it is a member

    Hi it me again. I had produce some codes for my previous qns but it doesn't work, can anyone help me with it? Private Sub DataGrid1_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid1.ItemCommand Dim btn As...
  12. T

    Button in datagrid display if it is a member

    Hi all. I had a question for datagrid. If the system determines that it is a member, a push button will display in the datgrid. How to code it to make this happen? thanks tiffany
  13. T

    Datagrid problem

    Hi, i had some problems with my datagrid. I had a link button in the datagrid in 123.aspx. When the link button is clicked, it will redirect to the abc.aspx page. abc.aspx contain the datas retrieve from ms sql when the link button is clicked in 123.aspx. How can i possible do it? thanks...
  14. T

    Compare datetime

    Hi, i had trired your method. But i think the logic of my codes have something incorrect. Could anyone help me with it? I will be using controller and a presentation layer. 'This is the method where i get from the table and select the datetime to compare with another datetime. This codes will...
  15. T

    Compare datetime

    Hi, thanks for the replies. I had tried convert datetiem into string. Dim d as string Dim t As String t = DateTime.Now.ToString() 'selectDateTime() is to ret the date and time from ms sql d = selectDateTime() Dim t3 As New DateTime(100) Dim t4 As New DateTime(20) d = t3.ToString() d =...
  16. T

    Compare datetime

    compare the date and time Hi. I had figure out the comparaion. But i can't convert the date and time to a string. How can this possible to be done? I have this following codes below: Dim d As String Dim t As String t = DateTime.Now.ToString() 'While selectDateTime() is to retrieve the date...
  17. T

    Compare datetime

    Hi, How can i compare the date and time? I want to compare the two date and time to see which is the easliest. Initially i need to reteieve the date and time from two tables and compare between the two. But how can i do so? Thanks! tiffany
  18. T

    problem with update sql statement.

    Hi, thank for you reply. Actually for the update statement that i had problem with, initially i wanted to get a copy of "topicID" from Table1 and copy to Table2. The process goes like this: Once the button is being clicked it will insert the values into Table1 with topicID and copy(update...
  19. T

    problem with update sql statement.

    Hello! i'm using ms sql. I had some problem with my update sql statement. Can help me with it? Thanks! There is a syntax error near ')'. Dim ds As New DataSet Dim da As New SqlDataAdapter("UPDATE msg SET topicID =(SELECT thread.topicID FROM thread WHERE thread.userID = msg.userID) WHERE...
  20. T

    A link in datagrid

    Hi, currently i'm using Ms SQL for my project. I will like to have a link but not hyperlink in a datagrid. Once the link is click, code-behind will do some actions and will be bought to a page where all the retrieve datas are display. How can i do this? What data type should i select to...
Top Bottom