|
please send me one example about show image in datagrid with source code or download file
regard
maryam
|
|
|
|
|
Hi,
Try this :
<asp:templatecolumn sortexpression="Name" headertext="Name">
<headerstyle forecolor="Black" font-bold="True">
<itemstyle width="200px">
<itemtemplate>
<asp:linkbutton runat="server" cssclass="GridItemLink" commandname="Select" text="<%# DataBinder.Eval ( Container.DataItem, "Name" ) %>">
This tag "" give u image in ur Datagrid.
Hope this helped u.Thanks and Regards.
|
|
|
|
|
<asp:TemplateColumn SortExpression="Name" HeaderText="Name"><br />
<HeaderStyle ForeColor="Black" Font-Bold="True"></HeaderStyle><br />
<ItemStyle Width="200px"></ItemStyle><br />
<ItemTemplate><br />
<img src="../Images/User01.gif"><br />
<asp:LinkButton runat="server" CssClass="GridItemLink" CommandName="Select" Text='<%# DataBinder.Eval ( Container.DataItem, "Name" ) %>' /><br />
</ItemTemplate><br />
</asp:TemplateColumn>
|
|
|
|
|
<asp:templatecolumn sortexpression="Name" headertext="Name">
<headerstyle forecolor="Black" font-bold="True">
<itemstyle width="200px">
<itemtemplate>
<asp:linkbutton runat="server" cssclass="GridItemLink" commandname="Select" text="<%# DataBinder.Eval ( Container.DataItem, "Name" ) %>">
I hope U can see the code now.
|
|
|
|
|
Just use templete column I guess u will get it
|
|
|
|
|
<b>I have developed the bottom code for the login </b>
Now i want to add the following implementations to this code
1. Prompting the user to change the password on first login
2. Password Resetting
3. Password Retrieval(Self service password Management)
4. Timely Expiry and updating the password
5. Restricting Multiple Logins by the same user for different Applications
6. Registration Request by the user
7. Automatic Logout of the user on closing of the browser
8. Menu to the user(Login, Logout etc)
9. Help for the User
10. Audit of each login with time stamp will be maintained
11. Session Idle time out
Can anybody help meee plzzzzzzzzzzzz..... it's urgent ?
<code>private void btnLogin_Click(object sender, System.EventArgs e)
{
dsUserdata =new DataSet();
dsUserdata = ssoWebService.ValidateUser(txtUserID.Text,txtPassword.Text);
//Declare a datatable and get the data into datatable
DataTable dtUserdata = new DataTable();
Session["count"]=1;
if (dtUserdata.Rows.Count>=1)
{
//redirect to HomePage;
dtUserdata= dsUserdata.Tables[0];
Session["LoginId"]= dtUserdata.Rows[0].ItemArray[0].ToString();
Session["LoginName"]=dtUserdata.Rows[0].ItemArray[1].ToString() ;
Session["UserId"]=dtUserdata.Rows[0].ItemArray[2].ToString();
Session["ApplicationId"]=dtUserdata.Rows[0].ItemArray[0].ToString();
Session["LoggedIn"]= true;
Response.Redirect("homepage.aspx");
}
else
if (Convert.ToInt16(Session["count"])>3)
{
// lock the status in the database
if (lockaccount()==1)
Response.Write("your Account has been blocked...Contact Adminstrator");
}
else
{
Session["count"]=Convert.ToInt32( Session["count"])+ 1;
Response.Write("Login Failed, Please check your details and Try again ");
}
}
private int lockaccount()
{
try
{
Connection = new SqlConnection(ConfigurationSettings.AppSettings.Get("ConnectionString"));
Command = new SqlCommand("update User_Application set LockedYN = 0 where LoginName= @loginname" ,Connection );
Command.Parameters.Add("@loginname",SqlDbType.VarChar,25).Value = txtUserID.Text;
Connection.Open();
return Command.ExecuteNonQuery();
}
catch(SqlException ex)
{
throw ex;
}
finally
{
Connection.Close();
}</code>
|
|
|
|
|
Can you use VS2005? A lot of what you are asking is already built in.
|
|
|
|
|
I don't get the VS 2005 Version. atleast can u tell me how to implement the get the count of wrong credentials that user entered. I already wrote code for locking and other things...it's urgent plzzz help me out...........
|
|
|
|
|
I want to try the same,
but I need some help from point 5, 7 to 11
Could you help me out please!
Thanks
Alwin
|
|
|
|
|
Hi all,
I have a ViewState DataTable which is bind with DataGrid.In DataGrid I have 2 columns they are Edit and Delete (and both are linkButton).
DataTable has 4 columns.
My Problem is that when i click on the Edit LinkButton it lanuches new Dialog window(this I have done) and on return of that window I need to update the DataTable with the corresponding row(this is what I am not getting).
I hope I have explained my self well.
Anyone please help me for this.
Thanks in advance.
|
|
|
|
|
Hello Everyone,
I'm Munjal from India. I know how to manage a session with the help of 'Session' in ASP.Net but how can we manage a session for a particular user logged in with the help of 'Cookie Authentication'. Can u send me the code
Munjal
|
|
|
|
|
I have tried the following methods but get the errors as below
file1.posetedfile.saveas("full file path where to save the selected file")
and
creating file by getting input stream from the file html controls
as follows
stream = file1.posetedfile.inputstream()
but i have got the error message as follows
"Access denied for the file (full path of the file)"
however i have the permission on the local iis for directory bowsing and modifying and running scripts.
plz help me please ............................ its urgent
-- modified at 6:47 Thursday 22nd June, 2006
|
|
|
|
|
It's not the permissions in IIS that is the problem, but the file permissions.
The user account running the ASP.NET code (usually ASPNET or IIS_WPG) has to have write permission to the file or the folder.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
ihv a problem ,i wnt to make a template file in asp.net page,in which i make the header ,footer ,bt the body is chge..give me some idea hw can i make the teplate .jst like Macromedai Dreamviwer make the html template file..
the purpose is i wnt to use it again and again im my webpoject.
thnks
|
|
|
|
|
Create Custome Controls For header and Footer and then add them where u want to add
|
|
|
|
|
Hi,
I want to write the exact replica of this in c#
Case 100 To 199
Return "One Hundred " & NumberToText(n Mod 100)
Case 200 To 999
Return "NumberToText"
after trying this in c#:
switch (n)
{
case (n==0): return "";
case (n>0 && n<20) : return "ada"
}
i get an error please suggest a way out
|
|
|
|
|
switch (n)<br />
{<br />
case (n==0): return "";<br />
case (n>0 && n<20) : return "ada";<br />
}
It's not that you're just missing a semi-colon there is it...
|
|
|
|
|
Hi,
switch (n)
{
case (n==0): return "";
case (n>0 && n<20) : return "ada";
}
gives the folowing error
cannot convert bool to int
|
|
|
|
|
You get that error message because you have a bool expression in the case statement. You can't have expressions in the case statement, only constants. You can only have distinct values, not ranges.
switch (n) {
case 0: return string.Empty;
case 1: return "one";
case 2: return "two"
default: return "other";
}
If you want to use ranges, you have to use if statements instead.
---
b { font-weight: normal; }
|
|
|
|
|
The frustrating thing is that you will have to use if statements in C#
to do this....
|
|
|
|
|
can anyone please tell me how to implement callback in asp .net 1.1
jiny
|
|
|
|
|
|
hi everyone,
i have small query regarding view state:
how to change a view state false to trueto file field in uploading time
murali
|
|
|
|
|
ballameharmurali wrote: how to change a view state false to trueto file field in uploading time
Do you mean you want the file field to persist the file path in its ViewState on postback? If so, then the answer is no as the value property of the file field is read-only at the client side.
|
|
|
|
|
Hi,
The web application that I have written, is capable to send emails.
There is a sample code at the bottom.
I figured this out by reading the msdn documentation and books.
There is a problem now. Although there are no erors, some of the emails to different email addresses do not get delivered.
I know that this code is not using outlook.
I was asked if this is using a relay server?
Do you think it is? If so how can I find out the name of the relay server?
Thanks
code to send email...
'Configure mail client
Dim mailClient As New SmtpClient("127.0.0.1")
'Create the mail message
Dim mailMessage As New MailMessage(from, [to], subject, body)
mailClient.Send(mailMessage) 'Send(Mail)
|
|
|
|