PDA

View Full Version : سوال: مشکل jQuery با master page ! چرا کسی دیگه کمک نمی کنه ؟!



oggiii
چهارشنبه 08 شهریور 1391, 14:45 عصر
من یه فرم رو به مستر پیج متصل کردم ! که مستر پیج دارای ContentPlaceHolder هست
اما نمی تونم داخلش جی گوئری هامو استفاده کنم همش ارور میگیرم کسی میدونه باید چی کار کرد ؟!
در صورتی که همین کد پایین رو در یه webform خالی بنویسم هیچ مشکلی ندارم اما وقتی پای ContentPlaceHolder میاد وسط نمی تونم کاری کنم !

چطوری باید در ContentPlaceHolderدستورات جی کوئری مونو بنویسیم ؟

moslem.hady
چهارشنبه 08 شهریور 1391, 15:00 عصر
خوب اروری که میده رو هم بگید!!
چطور اروریه؟

oggiii
چهارشنبه 08 شهریور 1391, 15:39 عصر
خوب اروری که میده رو هم بگید!!
چطور اروریه؟

این کدی هست که من داخل countentplaceholder نوشتم

<%@ Page Title="" Language="C#" MasterPageFile="~/master page.Master" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="Atoumasion.WebForm2" %>
<asp:Content ID="Content1" runat="server" contentplaceholderid="ContentPlaceHolder1">


<!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 id="Head1" runat="server">
<title></title>

</head>
<body>
<form id="form1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery UI Example Page</title>
<link type="text/css" href="css/vader/jquery-ui-1.8.23.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.23.custom.min.js"></script>
<script type="text/javascript">
$(function () {

// Accordion
$("#accordion").accordion({ header: "h3" });

// Tabs
$('#tabs').tabs();

// Dialog
$('#dialog').dialog({
autoOpen: false,
width: 600,
buttons: {
"Ok": function () {
$(this).dialog("close");
},
"Cancel": function () {
$(this).dialog("close");
}
}
});

// Dialog Link
$('#dialog_link').click(function () {
$('#dialog').dialog('open');
return false;
});

// Datepicker
$('#datepicker').datepicker({
inline: true
});

// Slider
$('#slider').slider({
range: true,
values: [17, 67]
});

// Progressbar
$("#progressbar").progressbar({
value: 20
});

//hover states on the static widgets
$('#dialog_link, ul#icons li').hover(
function () { $(this).addClass('ui-state-hover'); },
function () { $(this).removeClass('ui-state-hover'); }
);

});
</script>
</form>
</body>
</html>

</asp:Content>





اینم ارور هست
البته جاهای که سرور رنت میشه رو پاک می کنم باز ارور دیگه میده !
می خوام بدونم اصلن چطوری میشه داخلی contetnplaceholder کد Html نوشت و فایل javascripte رو بهش اضافه کرد

Server Error in '/' Application.

You can only have one <head runat="server"> control on a page.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: You can only have one <head runat="server"> control on a page.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:

[HttpException (0x80004005): You can only have one <head runat="server"> control on a page.] System.Web.UI.HtmlControls.HtmlHead.OnInit(EventAr gs e) +9561027 System.Web.UI.Control.InitRecursive(Control namingContainer) +134 System.Web.UI.Control.InitRecursive(Control namingContainer) +290 System.Web.UI.Control.InitRecursive(Control namingContainer) +290 System.Web.UI.Control.InitRecursive(Control namingContainer) +290 System.Web.UI.Control.InitRecursive(Control namingContainer) +290 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +489
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929

tooraj_azizi_1035
چهارشنبه 08 شهریور 1391, 17:54 عصر
هر چی هست بزار تو Head.

oggiii
چهارشنبه 08 شهریور 1391, 19:27 عصر
هر چی هست بزار تو Head.

این کارم کردم اما بازم جواب نداد !

بینید من اگر همه ی کارامو داخل 2 تا تگ html انجام بدم مشکلی ندارم ! مشکل از اونجا به وجود میاد که می خوام به مستر پیج متصل کنم و پای content placehoder میاد وسط