|
use OnmouseOver and call a javascript method to change the style
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
it does not work, because I use ASP.net linkbutton, the ID can not be found by javascript function by using GetElementByID,I do not know why.
|
|
|
|
|
Seraph_summer wrote: it does not work,
It should work
Seraph_summer wrote: because I use ASP.net linkbutton, the ID can not be found by javascript function by using GetElementByID,
Seraph_summer wrote: I do not know why.
Because, your LinkButton is Server Side Control . So, for that you need to first get ClientID then need use getElementByID.
var LinkClientID="<%=mylinkbutton.ClientID%>";
var NewID=document.getElementByID(LinkClientID);
Now use NewID for all operation,
Please check syntax once
Hope this will helpful to you.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
thanks, I see, ASP.net and old technology is different, the mixed appliacitons with these
technologies make me a little confused.
one more quetion, as I just put one new question, is it possible to use CSS style to realize this function?
thank you for your help all the time!
|
|
|
|
|
Welcome. Dont forget to mark post helpful if its really help you. This lets us know which answers are good in forum !
Thank You !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
sorry, again, after I get the id of the linkbutton (as follows), then how to change the backcolor of the button
I do not know which function can be used.
function LinkBtnMouseOver() {
var LinkClientID = "<%=LinkButton1.ClientID%>";
var NewID = document.getElementById(LinkClientID);
}
|
|
|
|
|
I try to Adding the AJAX Control Toolkit to the Toolbox as shown in this page:
Get Started with the AJAX Control Toolkit : The Official Microsoft ASP.NET
But it send me an error when I Select my AjaxControlToolkit.dll!
The Error is : There was an error loading types from assembly 'C:/Program Files/....../AjaxContolToolkit.dll'
'Could not load file or assembly 'System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, ..... or one of its dependencies. The System cannot find the file specified.'
Any Idea?
[]D @ []v[] []D @ []v[]
|
|
|
|
|
Which Framework do you have in your system ? Is it 2.0 or 3.5 ? Based on that you need to use that dll.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I Use .NET Framework 2.0! So?
[]D @ []v[] []D @ []v[]
|
|
|
|
|
Thanks man! I Choose AjaxControlToolkit Which is Compatible with my .net framework! but another problem is, i wanna use htmleditor tool, and there is no html editor! n it is just in upper version of ajaxcontroltoolkit!
Any Idea?
[]D @ []v[] []D @ []v[]
|
|
|
|
|
Hello,
For some reason I need to know which image-button causes postback. The following code does this job very well (according to coordinates). However when I click on a image button in a datalist. Somehow datalist items disappear. When I disable the codes(at pre_init) that calls the following function, the image button of the datalist works very well. Does anybody have any idea? Only you gurus would help me. Thanks in advance.
private string getPostBackControlName()
{
Control control = null;
string ctrlname = Page.Request.Params["__EVENTTARGET"];
if (ctrlname != null && ctrlname != String.Empty)
{
control = Page.FindControl(ctrlname);
}
else
{
string ctrlStr = String.Empty;
Control c = null;
foreach (string ctl in Page.Request.Form)
{
if (ctl.EndsWith(".x") || ctl.EndsWith(".y"))
{
ctrlStr = ctl.Substring(0, ctl.Length - 2);
c = Page.FindControl(ctrlStr);
}
else
{
c = Page.FindControl(ctl);
}
if (c is System.Web.UI.WebControls.Button ||
c is System.Web.UI.WebControls.ImageButton)
{
control = c;
}
}
}
if (control != null)
{
return control.ID;
}
else { return "budegil";}
}
Please clik on any "Ekle" button in the following web-page to see what I mean.
webpage[^]
|
|
|
|
|
[System.Web.Services.WebMethod]
public static DataSet GetContactName()
{ DataSet ds = new DataSet();
XmlDocument doc = new XmlDocument();
ds.ReadXml(System.Web.HttpContext.Current.Server.MapPath("App_Data/Group.xml"));
LoadData(ds); ?????
}
I need to bind this ds to a repeater control.
public void LoadData(DataSet ds)
{
DataSet ds = GetContactName();
repeaterGroup.DataSource = ds;
repeaterGroup.DataBind();
}
My question is, how to call LoadData from above webmethod. LoadData() method is not recognized from the webmethod.
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
How can a web-service method binds data? If LoadData() method is in your web page and you are trying to call it from web-service, then whatever you are doing is pointless. Do more reading on web-services and how they work before you work on them.
|
|
|
|
|
Everything has a necessity and I wanted to clearly communicate that am not a beginner.
Please ask why this is needed if you are interested to help or opt to stay out. There will be somebody else who will be willing to help. When I have posted a question on a forum, it clearly means I am looking for a solution.
This is what am trying to achieve.
Ajax control, collapsible panel extender(cpe) needs to expand a panel containing a repeater control and load data into repeater when the panel is expanded.
I found that there is no server side click event but there is an expand-collapse javascript handler.
To call server side code from AJAX, Pagemethods can be used.
<asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server">
</asp:ScriptManager>
[System.Web.Services.WebMethod]
public static DataSet GetContactName()
{
DataSet ds = new DataSet();
XmlDocument doc = new XmlDocument();
ds.ReadXml(System.Web.HttpContext.Current.Server.MapPath("App_Data/Group.xml"));
LoadData(ds);
}
public void LoadData(DataSet ds)
{
DataSet ds = GetContactName();
repeaterGroup.DataSource = ds;
repeaterGroup.DataBind();
}
I am not able to access LoadData from GetContactName(). Any help on this would be greatly appreciated.
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
you're not a beginner, but you want to know how to call a non static method from a static method ?
The only way to do this, is to have an instance of the class that contains the non static method. However, as your control is within a page lifecycle, you can't just create a page instance from out of nowhere, it won't create the lifecycle you need, as a page is not being requested. Therefore, it cannot be done, you need instead to create a page lifecycle, and call your method within that lifecycle. Otherwise, there's no chance you're going to see anything appear in your page.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello,
In my ASP.Net application i am using AJAX. Basically i am implementing Chat Application.
At a time many chat windows will be opened and based on the AJAX time interval messages will be updated in the chat screen.
My problem is i have set default focus as the Textbox and the text box is inside AJAX Panel. for every ajax refresh in each chat window the setfocus functionality is being called and all the windows are interchanging unnecessarily. From java script i want to know weather the current page is active or not,if it is active then the focus need to be on the textbox if the current page is not active the focus should not be on the textbox. can any one help me in this regard.
Prasad.
|
|
|
|
|
Issue:b> Want to calculate number of lines per page approx. 60 lines per page, while printing from HTML data stored in a Hidden field.
Description: In my project I have created html from database and get it into an hidden field from code behind.
Now, at client side I am fetching the data according to the conditions. Now, I want to count the sixty lines per page.
Can anyone tell me the solution?
|
|
|
|
|
Check this[^],it's only idea how can you find solution.
By the way why you made all underline and bold your question?
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
I want to know number lines while printing on the paper.
To know the number of lines in a file is hardly helpful in my case.
I have marked and underline my question to better understanding.
|
|
|
|
|
I think I understand your question.
Let's say you read 100 lines from your database and you want to display them on a page with a maximum of 60 lines per page.
Try something like this:
Lines = 100
Page = 0
PageSize = 60
While Lines > PageSize
Page = Page + 1
... Load your HTML PageData ...
Lines = Lines - (PageSize)
End
Page = Page + 1
|
|
|
|
|
No, actually I have all html data in an hidden fields.
Your solution is a good for static data but I need to print rendered data
|
|
|
|
|
My requirement is to load the image series in random order in the web page. The user has to rearrange in the correct order..
I am using HTML table which creating dynamically at the run time based on number of images..
Like wise the text boxes were also created. But I am not able to retrieve the values entered by the user in textbox..
- Varun Prakash
|
|
|
|
|
Hello,
I have a big problem that I could not overcome. I have a datalist placed in Ajax-update panel. I inserted a command button that is supposed to insert the item to another datalist.
when I clicked on the button, somehow the datalist items disappers. Therfore the itemcommand event is not fired at all. What I know is that, the viewstate hold the infrmation and the items should be there despite the postback.
Is there such a problem commonly faced or , is theresomething wrong with my settings?
All the best.
|
|
|
|
|
You may need to see what I am talking about...
Please click on "Ekle" button at
link[^]
|
|
|
|
|
Are you creating the datalist at runtime?
|
|
|
|