Thanx a lot i found another solution for my issue.... actually i used the following code to solve it...
i used String collection to store the value and checked it and printed the table accordingly
ElseIf page = "UserApplication" Then
If DS.Tables(0).Rows.Count > 0 Then
Dim nfile As StringCollection = New StringCollection
Session("sc1") = nfile
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))
Now the Html table gets populated by the following code:
Public Sub PopulateAppUsrRow(ByVal Usrid As String, ByVal Usrname As String, ByVal Grpid As String, ByVal Grpdsc As String, ByVal FncDsc As String)
If Not Session("sc1").Contains(Usrid) Then
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 >" + FncDsc + "</td></tr>")
Response.Write("<tr><td align=left> </td><td align=left >" + Usrname + "</td><td align=left >" + Grpid + "</td><td align=left >" + Grpdsc + "</td><td align=left >" + FncDsc + "</td></tr>")
Im happy with this kinda output.. any advice is appreciated...
For this, when user login to application ,also retrieve the type of user say administrator etc and save the type of user in session.And on every pageload, you can just check the type of user and accordingly yoy can take decision which buttions/links you need to disabe/hide.
And if user goes direcly to the page which is not for it ,you can show "Access Denied" message.
iam using asp.net2.0 with c# with sql serever i want to store the employees details in the database which includes image of employee also so how to retrieve the image from database and display in image control
You can save the image path in database and store the image in physical location. So, when you are retreiving the from database, retreive the image path and then load the corresponding image from physical path.
Doesn't work like that: what happens is you try to work it out for yourself using the years of experience and knowledege you already have. Then when you are still stuck you come here and say 'This is what I have already tried: can you help me see where I am going wrong?'
In any case, if you googled you'd probably find a thoudand and one ways to do this.
iam using asp.net2.0 with c#,in my website iam using
requiredfield validators and ajax controls. if iam entered any incorrect values in textboxes then i want to clear the text boxes then i have return the code for clearing the controls in clear button . but when i click clear button then validation controls and ajax validator calloutextenders is displaying and the textboxes are not clearing. how to solve this situations please give me example which helps me
hi i need to make an entry in the session table once the user logs. need to use web service methods for everything. i ve written a stored prov for login and within that i ve called the session procedure. while running web service method i m getting an error "string or binary truncated. statement has been terminated".
as i couldnt spot the error i tried writing a separate method for session in webservice and tried calling it from login method. i m not getting any error but the entry is not made in the session table.