|
Ummmm .... without using graphics (i.e. jpg, png, bmp) there is no way to make a circular item. Maybe HTML 5 but that's not fully supported by all browsers yet.
Your going to need to either dynamically generate the image; Professional C# - Graphics with GDI+[^] a nice place to start.
Or use a precanned image and just use some fancy JavaScript.
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
I have a dynamic list of rows in a table, and in each one of those rows are cells that contain a button, a ModalPopupExtender control, and a label control. If the user presses the button in the 15th table row, then a popup window should appear that will let the user pick a name. Than name must be returned from the popup and placed in the label in the table cell in the 15th row right next to the cell that contains the button. All of these controls are dynamically created at runtime based on the number of rows returned in a query.
So basically my problem will be solved once I know how to pass the index of the row selected in the table to the code that the MPE uses to select the name. If I can just get the index of theinto a hidden field I think I can get the rest.
Thanks.
Adam
|
|
|
|
|
I solved my problem by embedding the index in the ID of the button control, and then picking it off in the Click event of the button.
|
|
|
|
|
I have a WebDayView control (proprietary Infragistics ASP.net control) in a user control. This control has a client-side click event. The click event executes a piece of Javascript which in turn calls a static webmethod in the codebehind. What I want is for this webmethod to return the string “Hello” to the Javascript function so that an alert can display it. The problem that I have is that the alert displays “undefined” instead of “Hello”. This is because the webmethod executes only after the Javascript has executed. How can I get my code to work properly so that the alert displays the returned string from the webmethod?
Cs:
[System.Web.Services.WebMethod]
public static string SetAppointmentInfo(int key)
{
return "Hello";
}
Aspx:
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
</asp:ScriptManager>
<div>
<uc1:WebUserControl ID="WebUserControl1" runat="server" />
</div>
</div>
</form>
</body>
</html>
Js:
function WebDayView1_Click(oDayView, oEvent, element) {
alert(PageMethods.SetAppointmentInfo(15, OnSucceeded, OnFailed));
}
function OnSucceeded() {
//alert("Succeeded");
}
function OnFailed() {
alert("Failed");
}
Cs (user control):
protected void Page_Load(object sender, EventArgs e)
{
this.WebScheduleSqlClientProvider1.Connect("Database=cmRMI;Server=processor;user id=hardus;password=hardus");
this.WebDayView1.ClientEvents.Click = "WebDayView1_Click"; //register click event
}
Aspx (user control):
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
<Scripts>
<asp:ScriptReference path="~/scripts/JScript.js" />
</Scripts>
</asp:ScriptManagerProxy>
<igsch:WebScheduleInfo ID="WebScheduleInfo1" runat="server"
onactivityadded="WebScheduleInfo1_ActivityAdded"
onactivitydeleted="WebScheduleInfo1_ActivityDeleted" onactivityupdated="WebScheduleInfo1_ActivityUpdated" >
</igsch:WebScheduleInfo>
<p>
<ig_scheduledata:WebScheduleSqlClientProvider ID="WebScheduleSqlClientProvider1"
runat="server" WebScheduleInfoID="WebScheduleInfo1" StyleSetName=""
StyleSetPath="" StyleSheetDirectory="">
</ig_scheduledata:WebScheduleSqlClientProvider>
</p>
<igsch:WebDayView ID="WebDayView1" runat="server"
WebScheduleInfoID="WebScheduleInfo1" StyleSetName="" StyleSetPath=""
StyleSheetDirectory=""
StyleSheetFileName="C:/Users/Hardus/Documents/Visual Studio 2008/WebSites/toets/ig_res/ElectricBlue/ig_dayview.css">
</igsch:WebDayView>
<igmisc:WebPageStyler ID="WebPageStyler1" runat="server"
StyleSetName="Default" />
|
|
|
|
|
Please read the forum guidelines and learn how to format code snippets you post. No one is going to read this unformatted garbage
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
My apologies. Here is the formatted code:
Cs:
[System.Web.Services.WebMethod]
public static string SetAppointmentInfo(int key)
{
return "Hello";
}
Aspx:
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
</asp:ScriptManager>
<div>
<uc1:WebUserControl ID="WebUserControl1" runat="server" />
</div>
</div>
</form>
</body>
</html>
Js:
function WebDayView1_Click(oDayView, oEvent, element) {
alert(PageMethods.SetAppointmentInfo(15, OnSucceeded, OnFailed));
}
function OnSucceeded() {
}
function OnFailed() {
alert("Failed");
}
Cs (user control):
protected void Page_Load(object sender, EventArgs e)
{
this.WebScheduleSqlClientProvider1.Connect("Database=cmRMI;Server=processor;user id=hardus;password=hardus");
this.WebDayView1.ClientEvents.Click = "WebDayView1_Click";
}
Aspx (user control):
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
<Scripts>
<asp:ScriptReference path="~/scripts/JScript.js" />
</Scripts>
</asp:ScriptManagerProxy>
<igsch:WebScheduleInfo ID="WebScheduleInfo1" runat="server"
onactivityadded="WebScheduleInfo1_ActivityAdded"
onactivitydeleted="WebScheduleInfo1_ActivityDeleted" onactivityupdated="WebScheduleInfo1_ActivityUpdated" >
</igsch:WebScheduleInfo>
<p>
<ig_scheduledata:WebScheduleSqlClientProvider ID="WebScheduleSqlClientProvider1"
runat="server" WebScheduleInfoID="WebScheduleInfo1" StyleSetName=""
StyleSetPath="" StyleSheetDirectory="">
</ig_scheduledata:WebScheduleSqlClientProvider>
</p>
<igsch:WebDayView ID="WebDayView1" runat="server"
WebScheduleInfoID="WebScheduleInfo1" StyleSetName="" StyleSetPath=""
StyleSheetDirectory=""
StyleSheetFileName="C:/Users/Hardus/Documents/Visual Studio 2008/WebSites/toets/ig_res/ElectricBlue/ig_dayview.css">
</igsch:WebDayView>
<igmisc:WebPageStyler ID="WebPageStyler1" runat="server"
StyleSetName="Default" />
|
|
|
|
|
One, you should have editted the original post rather than adding more.
Have you debugged?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Yes, thanks. I've managed to make it work.
|
|
|
|
|
from last two three days i get this error message althoug it was sending mail before no change in code.
The transport failed to connect to the server
|
|
|
|
|
Just a guess, but maybe the server is down, host name has been changed, is being blocked, etc. What have you checked?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Tach experts ..
I have ne problem where I do not know to solve that...
I have a control that is added in a page. Basically it is a Content Management System.
It selects a new page and can add different controls.
In the control itself, I use a ModalPopupvon Ajax, but who needs a script manager.
Now I wonder whether in the side where the control is already added a ScriptManager exists otherwise I add one.
Here
void AddScriptMagnager()
{
ScriptManager _scriptMan = ScriptManager.GetCurrent(this.Page);
if (_scriptMan == null)
{
_scriptMan = new ScriptManager();
_scriptMan.EnablePartialRendering = true;
_scriptMan.EnableScriptLocalization = true;
if (this.MuMPage.Page.Form != null)
{
foreach (Control ctrl in this.MuMPage.Page.Form.Controls)
{
this.MuMPage.Page.Controls.Add(_scriptMan);
}
}
}
}
I always get the error that a Extendersteuerelemente may not be registered before PreRender.
I appreciate any help and thanks a lot in advance.
modified on Monday, June 21, 2010 9:02 AM
|
|
|
|
|
[CODE] There is a defined tag for this, <pre> implemented by clicking the "code block" toolbar item directly above this textarea. Please correct your post and read the posting guidelines for this site.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Add where are you calling the AddScriptManager method? Obviously no in the PreRender event handler.
The common implementation is to include a ScriptManger in the master page so it is not necessary to be included in child pages and is available for use.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
but what shall i do if there is none available in the master page?
|
|
|
|
|
You wrote the master page correct? Add a ScriptManager! If you did not write the master page then the author probably did not intend for Ajax to be used in this manner
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Nope, i c´ant! This is Standart site for everysite inour CMS.
I'm trying to do exactly that! Just when none is there in the page where I try to add the control at runtime and add a Script Manager.
And i get
Collection was modified; enumeration operation may not execute.
|
|
|
|
|
HELLO, I now have a template contains a script manager.
but I get this error message but still
Extender controls may not be registered after PreRender
|
|
|
|
|
HELLO, the error tells you what to do
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
but what is the right event to put into?
|
|
|
|
|
Can you do nothing on your own?
Go to the address bar of your browser and type, www.google.com, then click GO.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
is already done!
thxs for your helps.
modified on Tuesday, June 22, 2010 3:12 AM
|
|
|
|
|
Hi..
i just open new window using javascript.
Here Code below
function winopened() {
var docprint = window.open("AddCompany.aspx","child","toolbar=no,location=no,directories=no,menubar=yes,scrollbars=yes,width=1020, height=520");
return true;
}
so its working good if i click to button so new window pop up . its fine but when i try to close to that window direct to browser close button its wont be close i dont know wht the porb..
try and try untill reach success..
|
|
|
|
|
It is very hard to understand what you are trying to say.
To my understanding,
You want to close the Popup Window when the browser Close button is clicked right?
|
|
|
|
|
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 504
|
|
|
|