-
April 23rd, 2009, 03:28 AM
#1
[RESOLVED] How to ReFresh a user Control
i have a userControl and am using it in a aspx page, now i have expose the Following Method that reside in the usercontrol like this
Code:
public void load_Again()
{
string clientscript = "";
// make available to all subcontrols a variable with the client ID of the textbox in which to store the selected activity IDs
clientscript = "var txtbxActvClientID = '" + txtbxActvs.ClientID.ToString() + "'; ";
// assign the current list of selected activities to the list for JavaScript here
//clientscript += "var ActivityList = String(\"" + txtbxActvs.Text + "\"); ";
ClientScriptManager cs = Page.ClientScript;
cs.RegisterClientScriptBlock(this.GetType(), "txtbxlookupid", clientscript, true);
HighlightSelectedActvs();
}
and am calling it on my aspx page like this
Code:
ActivityCtrl1.load_Again();
i have Copied the code you see in the method load_Again() from the page load event of the Control. I want refresh or load the page again after i click a button in my aspx page.
Thank you
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
-
May 2nd, 2009, 04:56 PM
#2
Re: How to ReFresh a user Control
Wrap this around your control...
<a href="#" onclick="location.reload(true)">CONTROL HERE</a>
Its a JavaScript call that will provide the functionality I think you are looking for
Hope this helps,
Larry Darrah
MS Architect Evangelist
-
May 4th, 2009, 01:28 AM
#3
Re: How to ReFresh a user Control
Thank you very much, this Did the Work
Thanks
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
-
May 20th, 2009, 03:52 AM
#4
Re: [RESOLVED] How to ReFresh a user Control
Thanks buddy, but i still have a Problem.
How do i use the Javascript you gave me in ASp.net. i tried io implement it like this on a Button Click event
Code:
Response.Write("<script><a href='SubjectStaff.aspx' onclick='location.reload(true)'>'ActivityCtrl.ascx'</a></script>");
Thanks
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|