Click here to Skip to main content
15,886,689 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: dynamic textbox in repeater Pin
Not Active17-Mar-10 4:27
mentorNot Active17-Mar-10 4:27 
AnswerRe: dynamic textbox in repeater Pin
T M Gray17-Mar-10 5:44
T M Gray17-Mar-10 5:44 
QuestionChange webresource before 'sending to client' Pin
Eduard Keilholz17-Mar-10 2:03
Eduard Keilholz17-Mar-10 2:03 
QuestionWeb User Control in Content page - Urgent; PLease help Pin
Ersan Ercek17-Mar-10 1:58
Ersan Ercek17-Mar-10 1:58 
AnswerRe: Web User Control in Content page - Urgent; PLease help Pin
T M Gray17-Mar-10 5:35
T M Gray17-Mar-10 5:35 
GeneralRe: Web User Control in Content page - Urgent; PLease help Pin
Ersan Ercek17-Mar-10 10:51
Ersan Ercek17-Mar-10 10:51 
GeneralRe: Web User Control in Content page - Urgent; PLease help Pin
T M Gray17-Mar-10 11:45
T M Gray17-Mar-10 11:45 
QuestionRowspan in html table according to the record from DB.... Pin
<<Tash18>>17-Mar-10 1:30
<<Tash18>>17-Mar-10 1:30 
Hi guys.. I am working on a web application on Vb platform. Now in my application i have a button on clicking it generates an html table based on the records retrieved from my database.. Now the issue is I wanna rowspan certain cells in my html table for repeated Records... Now heres the code:

Private Sub BtnApp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnApp.Click
    Response.Redirect("form_frameset.aspx?sno=&page=UserApplication&keyid=&keyinfo=All")
End Sub


on the above button click it navigates to another page where the Html table gets populated.. the code on the next page is as follows:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        Dim page As String = Request.QueryString("page")
        Dim keyid As String = Request.QueryString("keyid")
        Dim keyinfo As String = Request.QueryString("keyinfo")
MyConn = New OdbcConnection(Session("sybase_constr"))
        Dim SelectCmd As OdbcCommand
If page = "UserApplication" Then
            Dim sqlstring As String
            If keyinfo = "All" Then
                sqlstring = "Select  ug.UserID,u.firstname, fg.GroupID, g.GroupDesc, f.FunctionID,f.FunctionDesc from EACS_Function f,  EACS_UserGroup ug,  EACS_FunctionGroup fg, EACS_Group g, EACS_user_1 u where   f.ApplicationID='" & keyid & "' and fg.FunctionID = f.FunctionID and fg.GroupID = ug.GroupID and ug.userid =  u.userid and fg.GroupID = g.GroupID order by ug.UserID"
            End If
            SelectCmd = New OdbcCommand(sqlstring, MyConn)
Dim DS As DataSet
        Dim MyCommand As OdbcDataAdapter
        MyCommand = New OdbcDataAdapter(SelectCmd)
        MyConn.Open()
DS = New DataSet
            MyCommand.Fill(DS)
Dim i As Integer
        i = 0
If page = "UserApplication" Then
            If DS.Tables(0).Rows.Count > 0 Then
                InsertPageBreak()
                InsertAppUserHeader()
                For i = 0 To DS.Tables(0).Rows.Count - 1
                    PopulateAppUsrRow(DS.Tables(0).Rows(i)(0), DS.Tables(0).Rows(i)(1), DS.Tables(0).Rows(i)(2), DS.Tables(0).Rows(i)(3), DS.Tables(0).Rows(i)(4), DS.Tables(0).Rows(i)(5))
                Next
            Else
                Response.Write("<script language=javascript > alert('Sorry no records found'); </script>")
            End If


Private Sub PopulateAppUsrRow(ByVal Usrid As String, ByVal Usrname As String, ByVal Grpid As String, ByVal Grpdsc As String, ByVal Fncid As String, ByVal FncDsc As String)

        Response.Write("<tr><td align=left>" + Usrid + "</td><td align=left >" + Usrname + "</td><td align=left >" + Grpid + "</td><td align=left >" + Grpdsc + "</td><td align=left >" + Fncid + "</td><td align=left >" + FncDsc + "</td></tr>")
    End Sub
Private Sub InsertPageBreak()
        Response.Write("</table></font><br style='PAGE-BREAK-BEFORE:always'>")
    End Sub
Private Sub InsertAppUserHeader()
        Response.Write("<font face=Arial ><table cellspacing=0 width=95% border=1 ><tr><td colspan=10 align=center ><b>Abu Dhabi Islamic Bank. <br> Application Management System.  </b></td></tr>")
        Response.Write("<tr><th align=center>User Id</th><th align=center >User Name</th><th align=center >Group Id</th><th align=center >Group Description</th><th align=center >Function Id</th><th align=center >Function Description</th></tr>")
    End Sub


Now the table which gets populated is as follows:


                             National Bank. 
                      Application Management System.  
User Id   User Name   Group Id   Group Description   Function Id  Function Description 
000120   Hassan Sid   AMS01     Complete AMS      A004     User 
000120   Hassan Sid   AMS01     Complete AMS      A002     Group 
000120   Hassan Sid   AMS01     Complete AMS      A012     Reports 
000120   Hassan Sid   AMS01     Complete AMS      A003     Functions 
000120   Hassan Sid   AMS01     Complete AMS      A007     Group/User 
000120   Hassan Sid   AMS01     Complete AMS      A001     Application 
000120   Hassan Sid   AMS01     Complete AMS      A011     Audit Trial 
000120   Hassan Sid   AMS01     Complete AMS      A005     Group/Function 
000120   Hassan Sid   AMS01     Complete AMS      A009     Synchronise Users 
000120   Hassan Sid   AMS01     Complete AMS      A006     Special Group/user 
000120   Hassan Sid   AMS01     Complete AMS      A010     Pending for Approval 
001155   Ehab         AMS01     Complete AMS      A004     User 
001155   Ehab         AMS01     Complete AMS      A002     Group 
001155   Ehab         AMS01     Complete AMS      A012     Reports 
001155   Ehab         AMS01     Complete AMS      A003     Functions 
001155   Ehab         AMS01     Complete AMS      A007     Group/User 
001155   Ehab         AMS01     Complete AMS      A001     Application 
001155   Ehab         AMS01     Complete AMS      A011     Audit Trial 
001155   Ehab         AMS01     Complete AMS      A005     Group/Function 
001155   Ehab         AMS01     Complete AMS      A009     Synchronise Users 
001155   Ehab         AMS01     Complete AMS      A006     Special Group/user 


Now i want to row span the cells that have the same records... can any1 plzz advice me...

Thanx in advance...
Tash...
AnswerRe: Rowspan in html table according to the record from DB.... Pin
Brij17-Mar-10 2:07
mentorBrij17-Mar-10 2:07 
GeneralRe: Rowspan in html table according to the record from DB.... Pin
<<Tash18>>17-Mar-10 2:14
<<Tash18>>17-Mar-10 2:14 
GeneralRe: Rowspan in html table according to the record from DB.... Pin
Brij17-Mar-10 2:25
mentorBrij17-Mar-10 2:25 
AnswerRe: Rowspan in html table according to the record from DB.... Pin
Member 450194017-Mar-10 2:27
Member 450194017-Mar-10 2:27 
AnswerRe: Rowspan in html table according to the record from DB.... Pin
<<Tash18>>17-Mar-10 2:51
<<Tash18>>17-Mar-10 2:51 
GeneralRe: Rowspan in html table according to the record from DB.... Pin
Member 450194017-Mar-10 3:01
Member 450194017-Mar-10 3:01 
GeneralRe: Rowspan in html table according to the record from DB.... Pin
<<Tash18>>17-Mar-10 19:32
<<Tash18>>17-Mar-10 19:32 
AnswerRe: Rowspan in html table according to the record from DB.... Pin
Member 450194018-Mar-10 4:39
Member 450194018-Mar-10 4:39 
GeneralRe: Rowspan in html table according to the record from DB.... Pin
<<Tash18>>19-Mar-10 20:03
<<Tash18>>19-Mar-10 20:03 
AnswerRe: Rowspan in html table according to the record from DB.... Pin
<<Tash18>>19-Mar-10 21:10
<<Tash18>>19-Mar-10 21:10 
Questionhow to give access to pages and for controls in asp.net2.0 with c# Pin
developerit17-Mar-10 1:19
developerit17-Mar-10 1:19 
AnswerRe: how to give access to pages and for controls in asp.net2.0 with c# Pin
Brij17-Mar-10 1:59
mentorBrij17-Mar-10 1:59 
GeneralRe: how to give access to pages and for controls in asp.net2.0 with c# Pin
developerit17-Mar-10 21:21
developerit17-Mar-10 21:21 
AnswerRe: how to give access to pages and for controls in asp.net2.0 with c# Pin
Abhijit Jana17-Mar-10 23:04
professionalAbhijit Jana17-Mar-10 23:04 
Questionhow to save image in database using asp.net with c# and display in image control Pin
developerit17-Mar-10 0:15
developerit17-Mar-10 0:15 
AnswerRe: how to save image in database using asp.net with c# and display in image control Pin
Abhijit Jana17-Mar-10 0:29
professionalAbhijit Jana17-Mar-10 0:29 
GeneralRe: how to save image in database using asp.net with c# and display in image control Pin
m@dhu17-Mar-10 0:32
m@dhu17-Mar-10 0:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.