|
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script language="javascript" type="text/javascript">
function myFunction()
{
alert("Entered myFunction");
}
</script>
</head>
<body onload="myFunction()">
<form id="form1" runat="server">
<div>
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
</asp:contentplaceholder>
</div>
</form>
</body>
</html>
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: </blockquote>
Thanks very much Mark - this is so close, but back to an error I've seen before (it turns out I can't have been so far from getting it already!)
With the code as you gave it, I get the folloing error "Cannot use 'javascript' because another language has been specified earlier in this page (or was implied from a CodeFile attribute)."
If I remove language="javascript" line, I'm back to getting the "The type or namespace name 'function' could not be found (are you missing a using directive or an assembly reference?)" error.
Any ideas?
(You can have your two crucial letters, you are an asset )
|
|
|
|
|
And do you have another language specified? Perhaps you code post the snippet that is giving you problems.
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: And do you have another language specified? Perhaps you code post the snippet that is giving you problems.
Certainly
My master page is this:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="~/LoginMaster.master.cs" Inherits="LoginMaster" %>
function myFunction()
{
alert("Entered myFunction");
}
protected void Page_Load(object sender, EventArgs e)
{
}
<title>Page title
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
And the Code File (LoginMaster.master.cs) is just this:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Login : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
So I don't think I'm intentionally specifying a language anywhere, other than the Master Language in the page declaration - but that's standard isn't it(?), and only as you had it in the suggested code.
Thanks again!
A
|
|
|
|
|
You do not need to include the Page_Load event in the script block, it is already in the code behind. By doing so you are trying to use two languages in the same block, which is where the build error is coming from. If you need to include server-side script, it needs to be in a seperate script block.
Also remove the runat=server from the script block for javascript.
only two letters away from being an asset
|
|
|
|
|
A client script tag should not have runat="server".
You can't mix client script and server script in the same script tag.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi All,
How to register in MSDN Subscriptions,Pls send me link if anybody have?
Thanks.
|
|
|
|
|
I am using Visual Studio .NET 2003 to develop the application. My issue is that i had to generate a Word Report with password from an ASP.NET web application.
After much try i got the dll Microsoft Word 11.0 Object Library and with the help of which while trying to generate a word document with password from a application it was throwing a runtime exception.I had to impersonate the user as it showed an acces violation.
COMException (0x800a175d): Could not open macro storage.
When performed a search with this, i came to know the necessity of configuring the Word application of the server with DCOMCNFG - as setting the word to be run under interactive user mode etc. But that is very risky as listed in the links,
[url]http://support.microsoft.com/kb/q288366/[/url] -- (Explains how to configure with DCOMCNFG)
[url]http://support.microsoft.com/kb/257757/[/url]
Can any body tell me how to solve this without using DCOMCNFG ?
The following link tells me that it can also be achieved by saving the document as XML and manipulating the XML.
http://www.thescripts.com/forum/thread374627.html
Is it possible to set a password while generating with the XML ? .. i don't think that it is possible but still....
Then how to stream that file to the client ?
If any body could give me any suggestions or links i'll be grateful...!
Your suggestions might be of great value....
If anybody comes across any link or any thing please do reply ....
I will be very grateful...
-- modified at 8:25 Wednesday 4th April, 2007
jij
|
|
|
|
|
How can I make one masterpage on hole server. I have about 20 different application and they all are placed allover the network. I'm cleaning the main application's on one server and making them look like same. My idea is that I have one masterpage that is my homepage and then if user uses some application the application opens in contentplaceholder and in the masterpage has site map so user can go back to the main page or subpage.
The application can bee something like this homepage->sales->application
Thanks
|
|
|
|
|
We are developing application using .Net 2.0 , Vb.net. We have a following requirement
We need to develop a user control or a master page which has the following menus: Save, Submit: Approve
This User control or a master will be included in webpage A, B, C. When we are in Webpage A, on click of Save ( on control ), the save functionality of Page A should be called. When we are in Page B, on click of Save, the save functionality of Page B is called. If some one know how to achieve this functionality let me know and any sample code is very useful
Thanks and regards
shyam
|
|
|
|
|
It's called Event Handling
only two letters away from being an asset
|
|
|
|
|
n my project have sub menu . When I click the sub menu option ,it displayed everything.
In Main page have two drop down lists. When I was moving to upward the sub Menu, two drop down lists will display in the title bar of the SubMenu . The title bar contains the title and Close(hyperlink) .The title bar is div control.
Is it possible to hide the drop down lists when I moving to drop down lists?. The drop down lists are dynamically created.
Apart from "Z-Index". Pls give the solution as soon as possible.
|
|
|
|
|
z-index does not work for listboxes, but there is a way of making this happen using an iframe under your divs, please see here[^] as an example.
|
|
|
|
|
Mr.Paddy Boyd,
In my sub menu Iframe has been used. Is it any way to overcome this problem?
-- modified at 7:01 Wednesday 4th April, 2007
|
|
|
|
|
And that hasn't fixed your problem?
|
|
|
|
|
Are you sure you're expanding the iframe to match the size of your div?
|
|
|
|
|
HI all,
There's any measure or method for a better display and functionality of Asp.net controls in Mozilla browser.coz all the controls are working fine in IE but the textboxes are compressing,validators are not working in the Mozilla.
Pls help me in this issue.
thanks in advance
Have a Nice Day Dudes
|
|
|
|
|
Web service security is implemented using WSE 2.0 credential passing technique or just block the anonymous access and enabled Integrated Window Authentication. In case of WSE i don't need custom UsernameTokenManager.
Can any one help me to find out the differences between two.
I don't want to allow user acces the web service through URL.
Thanks
Lokesh
|
|
|
|
|
Hi there ,
Can anyone help me out!!
I have a report (basically retrieving of records from the database and show it in a htm table format)
which is displayed on the browser as htm table..
Now my problem comes here..
I was asked to program such that the report is shown in excel rather than as html table..
with great enthusiasm I started working only to find out i am not able to do..
Pls help me out!!
I am posting my code here :
<html>
<head>
<title>Result of Database Query</title>
</head>
<body>
<h1>Result of Database Query</h1>
<%
set myconn = server.createobject("adodb.connection")
connection = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("g1.mdb")
myconn.open (connection)
set result = server.createobject("adodb.recordset")
sql = "SELECT * FROM tblComments1 WHERE Field2 Like '" & request("device") & "%' and Field8 Like '" & request("status") & "%'"
set result = myconn.execute(sql)
if not result.EOF then
response.write("<p>Data for " & request("place"))
response.write("<table border=2><tr><th>Device Group<th>Device Name<th>Interface name<th>Type<th>Description<th>Duplex<th>VLAN<th>Status<th>Speed<th>Security")
while not result.EOF
response.write("<tr font size=5><td>" & result("Field1"))
response.write("<td>" & result("Field2"))
response.write("<td>" & result("Field3"))
response.write("<td>" & result("Field4"))
response.write("<td>" & result("Field5"))
response.write("<td>" & result("Field6"))
response.write("<td>" & result("Field7"))
response.write("<td>" & result("Field8"))
response.write("<td>" & result("Field9"))
response.write("<td>" & result("Field10"))
result.movenext()
wend
response.write("</table>")
else
response.write("<p>No Entry for " & request("place"))
end if
%>
<%
sExport = Request.QueryString("export") ' Load Export Request
If sExport = "excel" Then
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment; filename=" & ewTblVar & ".xls"
End If
%>
</p>
</body>
</html>
max
|
|
|
|
|
hi friends
pls comment
can we use a windows user control with a timer , in an aspx page?
rgds
|
|
|
|
|
yes, we can use windows user control with a timer.
pls have a look at this article.Get it[^]
Hope this will gives an Idea.
Regards,
Satips.
|
|
|
|
|
hi
Actually I have used the same thing,but I am unable to view the control,
thanks
|
|
|
|
|
Whaat error it Shows ? why unable to view the control?
Regards,
Satips.
|
|
|
|
|
I have created a user control with a label and timer,then copied the dll to the project folder ,not in the bin,then used the following code
<object id="MyWinControl1" height="200" width="200" classid="MyTimer.dll#MyTimer.UserControl1" viewastext="">
in source
one error is that there is no attribute called,viewastext,if we remove that we can run it,but nothing is displayed on the page
|
|
|
|
|
Hello,
How to raise events of UserControl on .aspx page?I have created a UserControl(containing dropdownlist).I have loaded Usercontrol on some button click() on .aspx page using LoadControl() method.Now when I select an item from dropdownlist,The selected item should be displayed.
Please help me.If possible try to expalin mw with an example.
Regards,
Aekta
|
|
|
|