|
write the following code
CheckBoxList1.Items(0).Attributes.Add("onmousemove","javascript:yourfunction()")
in javascript function you can pass whatever you want
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
Hi Prakash,
Thanks for your reply...
I did as u suggested...
But no event is attached to the listitems.
When i right click and view the HTML source, it looks like this...
No javascript event is attached to the list items...
|
|
|
|
|
I have test the below code i am apology on you giving the wrong code dont add items(0) you can directly add the attribute to your checkbox list it will work for all the items under the checkbox list.
checkBoxListTest.Attributes.Add("onmouseover", "javascript:alert('hellow');")
this code might solve your problem
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
I guess if you are not passing any arguments to the javascript function you can just go to the source and add
<asp:checkboxlist id="chkbox1" runat="server" onmouseover="function_name()">
It will take the javascript automatically.
But obviously if you wanna pass a parameter you have to uise attributes.add..
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
Hi I am working on a website where I want code for Upload File......
Means there is a textbox and two button......
After clicking browse button File browser will appear and
a file select as user wish and after that
by clicking update button file get uploaded
at specific location at website......
Please try to help me......
Thanks
Rajesh Jain
|
|
|
|
|
I think i have solved your problem
note filMyFile is a file control id
// Check to see if file was uploaded
if( filMyFile.PostedFile != null )
{
// Get a reference to PostedFile object
HttpPostedFile myFile = filMyFile.PostedFile;
// Get size of uploaded file
int nFileLen = myFile.ContentLength;
// make sure the size of the file is > 0
if( nFileLen > 0 )
{
// Allocate a buffer for reading of the file
byte[] myData = new byte[nFileLen];
// Read uploaded file from the Stream
myFile.InputStream.Read(myData, 0, nFileLen);
// Create a name for the file to store
string strFilename = Path.GetFileName(myFile.FileName);
// Write data into a file
WriteToFile(Server.MapPath(strFilename), ref myData);
}
}
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
guys again I am throwing you the question
salary
====
1000
2000
3000
4000
4500
1500
here i want to show the max value of two records
means want to show 4500 and 4000
how to do that
plz tell me the query
i need urgently...
Magi
|
|
|
|
|
select top 2 salary from salarytable.
What do u think?
|
|
|
|
|
Nilish wrote: What do u think?
To make it work you need to sort the result in descending order
|
|
|
|
|
Wrong forum selected buddy go to SQL/ADO.NET from it is ASP.NET forum
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Magh_M wrote: plz tell me the query
select top 2 salary from table_name order by salary desc
Magh_M wrote: need urgently...
It is waste to put this because this doesn't guarantee immediate reply, infact this annoys the posters.
Apurva Kaushal
|
|
|
|
|
one interesting query is der
but it returns only one record
mean if u want second heigest salary ,3 rd heigst salary like..
declare @n int
SELECT DISTINCT (a.salary) FROM Table a
WHERE @n=
(SELECT COUNT(DISTINCT(b.salary)) FROM Table b WHERE a.salary<=b.slaray)
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
Hi,
I have a gridview with 1000 + items in it and I have a dropdown list which contains all of the page number from the grid - when I user selects the dropdown list they are taken to that specific page number - this works a treat.
What I would like to do is change the dropdown list description to say 'Goto page A-C, Goto Page D-E. This will be more meaningful to the user as the Gridview contains customer names!
Any ideas? Please!
Thanks
Janet
|
|
|
|
|
by changing the description to say 'Goto page A-C, Goto Page D-E
for that u need to use predicates in the query.
|
|
|
|
|
is there any way to refresh the web site programitically after each 5 seconds in asp.net 2005
|
|
|
|
|
You can use following in your aspx page:
Code is God
|
|
|
|
|
I am placing it in the head tag.
Is it valid in asp.net 2005
|
|
|
|
|
Its HTML tag not asp.net so valid
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Actually , i was suggested to write 5000 for 5 seconds.but actually it works like the following tag for 5 seconds
<meta http-equiv="refresh" content="5" />
|
|
|
|
|
|
PLease delete all your other posts and decribe the scenario and only the code where you are getting error instead all these No one is going to read all these
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
While you post this message di you get the warning and did you notice that and again posted aah?
Please delete it and tell where the exact problem is ?
And don't Repost the same question.
Regards,
Satips.
|
|
|
|
|
Somewhere in your code (find it yourself!) you are assigning to dropDown.SelectedValue = something, and that something is not one of dropdownlist's items.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
I am trying to create a Custom control inherint CompositeDataBoundcontrol. I have to bind this Control with the CSLA Datasource. Following is the simple code of the control.
protected override void PerformSelect()
{
if (!IsBoundUsingDataSourceID)
this.OnDataBinding(EventArgs.Empty);
GetData().Select(DataSourceSelectArguments.Empty, this.OnDataSourceViewSelectCallback);
RequiresDataBinding = false;
MarkAsDataBound();
OnDataBound(EventArgs.Empty);
}
#endregion
private void OnDataSourceViewSelectCallback(System.Collections.IEnumerable retrievedData)
{
// Call OnDataBinding only if it has not already been
// called in the PerformSelect method.
if (IsBoundUsingDataSourceID)
{
OnDataBinding(EventArgs.Empty);
}
// The PerformDataBinding method binds the data in the
// retrievedData collection to elements of the data-bound control.
CreateChildControls(retrievedData,true);
}
protected override int CreateChildControls(System.Collections.IEnumerable dataSource, bool dataBinding)
{
if (dataSource != null)
{ Button btn = new Button();
btn.Click+=new EventHandler(btn_Click);
} pnl.Controls.Add(btn); this.Controls.Add(pnl); return 0;}
void btn_Click(object sender, EventArgs e)
{
System.Diagnostics.Debug.Write("Clicked");
}
My problem with the code is. When I click on Button the postback occurs but control is not going to event handler. Please help me. Where I am wrong>?
-- modified at 7:36 Thursday 21st June, 2007
Code is God
|
|
|
|
|
I am developing an application that needs to retrive a column from database and use its rows as acolumns names in a gridview control
dose any one know how to do that
Hassan Amaar
|
|
|
|