|
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?
|
|
|
|
|
No,
Datalist is already there.
|
|
|
|
|
Any ideas?
What could be the reason for that?
|
|
|
|
|
hii
hi want to get data of dropdownlist in asession.eg:
Session["Id"]=Dropdownlist1.SelectedValues;
Then i want to get this value in a textbox in other page like this.
txtvendorid.Text=Session["Id"].
but its not workin.
how can i take value from one page n get it in another page through session.
Shud i use namespace.Plz guide me.I have searched google but i didnt understand session exactly.
|
|
|
|
|
What is the error?
Post your code so as to investigate.
Did you debug the code?
|
|
|
|
|
Session["Id"]=Dropdownlist1.SelectedValue;
txtvendorid.Text=Session["Id"].Tostring();
If you are holding an array that contains more than one item you have convert it to array like=
string [] dimension = (string[])Session["Id"]
hope this helps
|
|
|
|
|
mylogics wrote: Session["Id"]=Dropdownlist1.SelectedValues;
This is fine.
mylogics wrote: Then i want to get this value in a textbox in other page like this.
txtvendorid.Text=Session["Id"].
Do like this,
If(Session["Id"] !=null)
{
txtvendorid.Text=Session["Id"].ToString();
}
mylogics wrote: but its not workin.
What do you by not working ? Are you getting any specific error ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
i working in asp.net and C#.net. i am comparing the values of two labels if they are not equal then start countdown. but it should be for five minutes only. mean when time start then 4:59(mm:ss) then decrease and when time become 0:00 then it will once again become 4:59 and again repeat the whole process if the the label values are not equal.
Regards
|
|
|
|
|
you need to use SetInterval to change time..
|
|
|
|