Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have a very strange problem



i have in may data base 3 users
the first one :id=4 ,username=hanan ,password 123
the second one :id=1005 ,username=nono ,password=555
i do not know why the id =1005 after 4
put it is not my problem


the problem is when i login to my website with the user one "hanan"
the site is berfect and the datalist bind to my data that i retrive from database
but when i log in with the second user the page doe not redirect from the login page to the home
there is no error appeare to me but when i debug i find that the data list does not bind
Posted
Comments
Richard MacCutchan 2-Jun-14 4:01am    
And? Do you have a question or what?
asmaaelshabaka 2-Jun-14 4:04am    
yes ofcourse what sholud i do
asmaaelshabaka 2-Jun-14 4:05am    
how can i solve this problem ????????????
DamithSL 2-Jun-14 4:25am    
update the question with your code related to datalist binding
asmaaelshabaka 2-Jun-14 4:36am    
i found that my code stop here with the second user
<asp:Image ID="Image1" runat="server" ImageUrl='<%#ImagePath(Eval("userphoto").ToString().Trim())%>' Width="74px" Height="61px" />




and this is the function
protected string ImagePath(string imageColumnValue)
{
string url = string.Empty;

if (imageColumnValue == string.Empty)
url = "/photos/empty.png"; // Give path to default image

else
url = "/photos/" + imageColumnValue;

return url;
}

1 solution

So, there is no problem with login. May be yor are binding datalist in wrong way.
Please check your function which binds datalist
 
Share this answer
 
Comments
asmaaelshabaka 2-Jun-14 4:08am    
it is bind correct when i use the first user ????????
asmaaelshabaka 2-Jun-14 5:08am    
i found that my code stop here with the second user
<asp:Image ID="Image1" runat="server" ImageUrl='<%#ImagePath(Eval("userphoto").ToString().Trim())%>' Width="74px" Height="61px" />




and this is the function
protected string ImagePath(string imageColumnValue)
{
string url = string.Empty;

if (imageColumnValue == string.Empty)
url = "/photos/empty.png"; // Give path to default image

else
url = "/photos/" + imageColumnValue;

return url;
}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900