|
samerh wrote: many suffers even if not using rad controls
Can you try with normal window popup? And let us know whether you got this error or not..
The way I understand about this error is that you got this when you try to refresh your page. So, maybe. your Rad control is refreshing its parent page when you close it.
|
|
|
|
|
I have tried it with normal window popup before but i have never faced this issue. However when i googled yesterday i found many developers facing the same issue with normal popup.
For rad popup, yes it is refreshing the main window and this is what i need, but upon refreshing that window the message appears. Through out my investigation for this issue, i read some articles saying that this is a normal act that the explorer do and this is a sort of security. They recommended using redirection (document.location.href) instaed of using window.close. This dont work in my case because i want to close the popup window and redirection keeps my popup open and redirect it and not close it and update the parent.
I know this is a bit crazy but i need a solution if there exists.
thanks for ur reply Michael.
|
|
|
|
|
Hi,
This is from Chandrakanth.
I would like to call a function which is in C#, From JavaScript.
How can i go for that?
Can any one give me repply for this.
Thanks And Regards
chandrakanth
Chandrakanth
|
|
|
|
|
Unfortunately, this isn't very straightforward - js runs in the browser on the client, the C# code on the server. To call anything on the server you'd need to use AJAX to make a call back to the server.
I tend to do this with a callbacks page - straight apsx page, no markup, and a big ol switch statement in page load, which looks for a querystring param which indicates the method in the callbacks file I wanna call...
C# has already designed away most of the tedium of C++.
|
|
|
|
|
document.getElementbyID("IDName").Click()
or
FireEvent
|
|
|
|
|
No, Ko Ye Htut.
The question that he was asking is about calling the server-side function from client-side. It's true that document.getElementbyID("IDName").Click() can invote the server-side click event. but your code won't work if he wants to call the normal server-side function (e.g. public void MyMethod(){ })
YeHtut wrote: FireEvent
You can't just fire the event to invote the server-side method from client-side script.. but it is possible to do with Ajax.
|
|
|
|
|
Hi,
you can try this.
Make Javascript function like this.
function GetClientScript()<br />
{<br />
var str= "My test";<br />
var test = '<%= GetFunction()%>';<br />
alert(test);<br />
}
Here GetFunction() is C# function. This function must return something else this cant work.
Now call this function onClientClick of any asp.net linkbutton or button.
And here you are..
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
U try to do like this.
This is written in code behind file.
public void ServerSideFunction()
{
...
}
This javascript is I was written in Aspx file.
<script>
<%ServerSideFunction;%>
</script>
I already test and work it.
|
|
|
|
|
U try to do like this.
This is written in code behind file.
public void ServerSideFunction()
{
...
}
This javascript is I was written in Aspx file.
<script>
<%ServerSideFunction();%>
</script>
I already test and work it.
|
|
|
|
|
Seem like you are confusing. The server-side script can be written in both class file (e.g. .cs or .vb) and aspx file. But if we want to write the server-side script in aspx file, you have to use <% %>.
So, the way that you showed is just writing the serverside code in aspx file. And it doesn't mean that you are calling the serverside function from client-side ( Javascript or vbscript or etc).
still confused? Okay. Let's say.. I want to call this function ( ServerSideFunction ) from Javascript when I click the button ( input button. not server-control). So, ServerSideFunction() should be invoked only when I click the button. (not on pageload).
How to do that?
|
|
|
|
|
I think so, anyway should be postback and call the Server Side function. Otherwise can not be called the server side function. AJAX is called partial postback and call the server function. So Main page is never refresh.
I know like this. If you know that ow to do with other way, please share it to me.
Thanks for best suggest.
|
|
|
|
|
As I said in this post[^], Ajax is the only solution for this problem. I was pointing out the mistake that you wrote in this post[^].
Thank you.
|
|
|
|
|
Hello,
I have a ASP.NET page and this page has Listboxes and some other controls like label, text boxes and a Hyperlink. When I click the Hyperlink I show up a Panel as a message box.
The issue is as soon as the Panel pops up, The list box behind the Panel is still Visible. But rest of the elements do not. Is there something we can do to sendback this list box
Regards,
Pavas
-----------------------
[http://longjump.com/]
Dynamic business applications that manage and coordinate teams and information
-----------------------
|
|
|
|
|
Hi,
try to set z-index of Panel. (In style)
May be it will help you.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
iam having a two input parameters in a stored procedures but from one time i want to send only one parameter ,the other paremeter is null in one case and the same way the other is also null in another case.how a null parameter is send to the sp.
|
|
|
|
|
myCommandObject.Parameters["@ParamName"].Value = DBNull.Value
|
|
|
|
|
in front end there are two text boxes one for reference no and other for employee id now the user can enter any of the value my query is how to write a stored procedure to check if the user enters refno then select statement is called for refno or if the user enter id then id select statemet has to call how it is possible to hceck which he entered in the
stored procedure
|
|
|
|
|
CREATE PROC FindEmployee
@RefNo VARCHAR(100) = NULL,
@EmpId INT = NULL
AS
IF @RefNo IS NOT NULL
SELECT * FROM Employees WHEERE RefNo = @RefNo
ELSE
SELECT * FROM Employees WHEERE EmpId = @EmpId
EXEC FindEmployee @RefNo = 'ABC123'<br />
EXEC FindEmployee @EmpId = 999
By specifying a default for each param in the SP (the = NULL bit) you do not have to pass that parameter to the stored procedure. Therefore by checking the default ( IS NOT NULL bit) you can determine which param was passed in. It should be obvious from the code above that if both are passed in it still uses @RefNo - this could be switched around to favour EmpId.
|
|
|
|
|
Hi, this might be a stupid question, but I don't know how to do it, and I need help...
I need to find out how to make one web-site controlled by more than one moderators.
I mean, for example, when one moderator is on-line and working on some profile to approve it (for example how moderator of forum work), another moderator should work on another profile. So, I don't know how to distribute the moderators job. And the number of moderators is growing.
thanks..
|
|
|
|
|
For something like this i'd probably use a local message queue on the server. This then sits there, allowing things to be popped off it, and new stuff added to the other end....
Do a goole for MSMQ (Microsoft Message Queueing)....
C# has already designed away most of the tedium of C++.
|
|
|
|
|
Hi,
I have created a Webusercontrol named sample.ascx.
I Have to dynamically load the usercontrol in my Webform.
The usercontrol has textbox control named Usernametxt,label control named UsernameLbl and a button control named Loginbtn
The following is the code i used in the pageload of my Webform,
protected void Page_Load(object sender, EventArgs e)
{
WebUserControl c;
c = LoadControl("WebUserControl.ascx") as WebUserControl;
if (c != null)
{
Controls.Add(c);
}
}
I get the following error:
Control 'ctl02_Usernametxt' of type 'TextBox' must be placed inside a form tag with runat=server.
Can ne body help me fixing the bug
zari
|
|
|
|
|
Hi zari,
the textbox (and all other input controls) must be embedded into a form. Only a form can post the user input to the server. You need something like that.
<form id="form1" runat="server"><br />
<!-- place your controls here --><br />
</form>
I think, that you already have this form-Tag in your page. Just change the line "Controls.Add(c);" to
"Form.Controls.Add(c);".
Tom
|
|
|
|
|
Hi my dears,
I have several UpdatePanels in my page . and in one of them I used a PalceHolder to add some controls to it in run time . everything is good and when my page loads controls will be added to PlaceHolder but when I click any other controls in other UpdatePanels in my page the PlaceHolder loses its controls.
pls help me know what to do ?
Thx a lot,
www.behzadi.net
|
|
|
|
|
Hello everyone,
well I'm trying to populate a DropDownList from a Selfjoined table. At first I was using a treeView but now they say the want a dropDownlist for that. I'm having touble in showing the tree like structure in the combo box
Can you plz give some guidlines or code samples for that
Thanks in advance
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
im getting error as
im trying to create crystal report where data is coming to dataset from query(select *from emp) and but when binding reportdocument to dataset it is giving error as below:
CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Invalid report file path.
Thanx is advance
|
|
|
|