|
Hi,
that will occurs because on every postback you are not firing this event of datagrid row databound.
You have to call this event on every postback.
Then you can overcome with this problem.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
I checked this code like
if(IsPostBack==true)
{
codes given
}
but it will not disable the button
|
|
|
|
|
Hi,
then there must be some another problem.
Try to figure out your code again ?
In which case its working and in which not..
Try this...
in page load just call function to fillGrid...
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
I will bind the grid in the page load itself.But in rowcommand of grid code is written to bind the grid row into the fields avialble.But when i selct the row the add button wil be disabled .thats my query
|
|
|
|
|
Hi,
so now you have to get one viewstate or session variable in that you have to get value that you have clicked delete or add button. on rowcommand set below code.
Like on delete click --- session["click"] = "delete"
on add click --- set session["click"] = "add"
Now check in datarowbound..
if session["click"] == "delete" then disable add button and visevesa...
Hope it will help you...
Bind grid in page load.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Dear Friend,
Your gridview your Add button is templatefield and given name is "btAdd". you are executing javascript while click on this button which run ok. Now if you want to disable while selecting row you can write bellow code::
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Button bt=(Button)e.Row.Cells[2].FindControl("btAdd");
bt.Enabled = false;
}
}
now let say while editing raw you want to enable Add button than write this code::
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
bindDataList();
Button bt = (Button)GridView1.Rows[e.NewEditIndex].Cells[2].FindControl("btAdd");
bt.Enabled = true;
}
I hope this will help you.
Thanks
"Good Thing Goes With Good People..."
|
|
|
|
|
i want to disable minimize button from a popup window.
am using ,
var win=window.open("Index.aspx","_blank","toolbar=no, location=no, titlebar=no,minimize=no,linkbar=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, width=1024, height=768, copyhistory=no")
for displaying popup window.
i dont want to disable maximize window.
Plz help.....
i dont want to use showModalDialog
|
|
|
|
|
Hi,
try this Link[^]
And another link is this[^]
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Sorry sir i didnt get u..
can u just show an exampl
|
|
|
|
|
Check the second link. Try to use that concept.
|
|
|
|
|
Actually i need to disable that button..
i tried on both links..
the first one ive tried earlier..
the second works only on button click also that is for minimising window on button click.
also ive googled a lot ..
is ther any other soln...
thanks nd regards...
|
|
|
|
|
use window.showModalDialog
This will show a popup window without Maximize and Minimize button
Read This link
showModalDialog Method
[^]
and Check the Last Example [ in bottom of the page ] . This will realy help you.
|
|
|
|
|
Hi,
try this links...
Link1[^]
Link2[^]
Or you can do one thing.
Just pop up plain window and then put one image like maximize button and onclick of that Maximize the window using javascript...
Hope it will help you.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Suppose, if user logged in using login page, then his credentials are checked in database and he is valid user then sessions are created for this user like session[user] = 'john'
we can use in any page to verify
if(session[user]!=null){}
But in Forms Authentication, we can do this in login page. Verify is the method to check the credentials in data base.
if (Verify (txtUserName.Text, txtPassword.Text))
{
FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, False);
else
lblMessage.Text = "Invalid login name orpassword specified...";
}
Once cookie is created here, then how can i use in all the pages
i used session in all pages starting -- if(session[user]!=null){}
using formsauth how can i do the above statement
G. Satish
|
|
|
|
|
i'm insert data and image into table for sql 2ooo now i need to using webform the image load particular time period then automatically change next image from retrieve database so give sourcecode for c#
|
|
|
|
|
ramesh_imayam wrote: give sourcecode for c#
You can't ask like that. It is considered as very rude behavior.
In order to answer your question, you should look at ASP.NET Ajax Timer control and UpdatePanel for retrieving the image from database and set it to Image control.
|
|
|
|
|
Sorry for interrupting into the thread.
I wanted to ask a pertaining question regarging this thread, after the particular instant of time , the image gets updated , now my question is if i click the back button after i am getting the third pic , shouldn't i get it's previous pic(second pic , I mean the back button back button will not take into consideration the seecond pic and will revert me to it's previous page) , instead of this i am being navigated back to it's previous page.
example this link
http://www.yahoo.com/[^]
there the pic are automatically updating , but the moment i click at the back button , the page get's navigated to previous page
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
It will depend on the code that you wrote. If you update the history from Javascript when you change the image, I think you will get the previous image (e.g second pic).
|
|
|
|
|
Try to use it using AJAX Timer Control ToolKit.
no one will provide you the source code !!!!
|
|
|
|
|
hello
In my table I have password feild which datatype is binary.
but in my asp.net 2.0 application i have textbox for password feild.
then how can i convert it into binary.
pls help me.
Gayatri
|
|
|
|
|
hi
pls help me urgently
Gayatri
|
|
|
|
|
it seems something sort of byte[] (like an image field).
so my suggestion is convert it first into byte[]
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
give me a convert syntax like this UserCode.
(" + Convert.ToInt32(txtUserCode.Text) + " ,
" + " ' " + txtPassword.Text + " ' " + ")
Gayatri
|
|
|
|
|
Hi,
you can do from this way..
string myByte = "Stingtest";<br />
System.Text.ASCIIEncoding encoding=new System.Text.ASCIIEncoding();<br />
Byte[] bytes = encoding.GetBytes(myByte);<br />
<br />
myByte = "";<br />
myByte = encoding.GetString(bytes);
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
hi
i am using asp.net 2.0 with c#.
and my database is MSSQL server in that i have tuser table in that
i have password feild which datatype is Binary.
i have following code
strSqlCmdText = "insert into tUser values( " + Convert.ToInt32(txtUserCode.Text) + " , "+
" " + " ' " + txtUserID.Text + " ' " + "," + " ' " + txtFirstName.Text + " ' " + ", "+
" " + " '" + txtLastName.Text + "'" + "," + " ' " + txtPassword.Text + " ' " + ", "+
" " + "'" + txtUserType.Text + "'" + ", "+
" " + "'" + dtpWarningDate.SelectedDate + "'" + " , "+
" " + "'" + dtpExpireDate.SelectedDate + "'" + ", "+
" " + "'" + drpdwnStatus.SelectedItem.Text + "'" + ", "+
" " + "'" + Session["LoginName"].ToString() + "'" + ", "+
" " + "'" + dtpCreateDate.SelectedDate.ToString() + "'" + ", "+
" " + "'" + txtUpDatedBy.Text + "'" + ", "+
" " + "'" + dtpUpdateDate.SelectedDate.ToString() + "'" + ")";
objClsDllSql.funSqlCmd(strSqlCmdText);
when it run that time following error is comming===========
Disallowed implicit conversion from data type varchar to data type binary, table 'eSRS.gayatri.tUser', column 'Password'. Use the CONVERT function to run this query.
pls help me.
Gayatri
|
|
|
|