|
Thanks Prakash for replying.
and as i said that i am new to this. So i dont know how to use flash or silverlight.
isnt there anyother way or isnt that possible they way i wanted in first post?
|
|
|
|
|
Accessing Window Application in the website is highly a security risks. You need to remove almost all the securities of IIS to do that which is like a website with free invitation for Hackers. I would suggest you to drop that thought.
Though, you can use ActiveX in your page. ActiveX is almost Window Application (actually Windows Custom/UserControl). Try writing a ActiveX in VC++ or VB6.0 as writing ActiveX in .NET is not easy.
You need to note, ActiveX will work only in Internet Explorer but not sure about IE 9.0 .
You can write an Applet using Java and embed it in the weboage which would work in most of the browser.
|
|
|
|
|
Hi All,
I have a checkboxlist(created from db) on form where user can selected multiple items when click on update button the form send the data to sql server database. This work fine, the problem I have when the user open the form for the same record number and want change the checkboxlist items. How do I go about doing this ?
For example: first time around user selected item 1,3,7,9 and 10
Second time around user selected item 2,3,5,7,9 and 10.
Any assistance is greatly apprecaited. please provide codes example.
Thanks
DocHoliday.
my code for the inserting to the db, the field that get insert are Application_id, Item# and Module (primary Key in db).
Protected Sub GetCheckedModule()
Dim MyItem As ListItem
mstrSelectedColumns = ""
For Each MyItem In chkbModule.Items
If MyItem.Selected = True Then
Session("Module") = MyItem.Value
Insert_SelectedModule()
End If
Next
End Sub
|
|
|
|
|
One, learn to format any code snippets you post here.
Bind the checklistbox to the datasource
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
DocHoliday66 wrote: when the user open the form for the same record number and want change the checkboxlist items. How do I go about doing this
You need to do the following:
1. Check the details about that 'record' number already exists or not.
2. If you find that there are items selected and saved in DB then retrieve that data using a Select query.
3. Once you have the data retrieved, go in a loop and explicitly select those items in the checkboxlist.
|
|
|
|
|
HI all friends i m stuck in my project badly i hav desind a page which should hav circle like shape of content place holder ....
will it be possible in asp.net to shape content place holder in custom as i wish
Thanx in advance friends
|
|
|
|
|
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
|
|
|
|