public

  • Download Gist
This_code_does_NOT_work.cshtml
C#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
@using BindSolution.Framework.Web.Extensions
@model ProjectViewModel
@{
ViewBag.Title = "Novo Projeto";
}
@section scripts {
 
<script type="text/javascript">
$(function() {
$('#Logo').bindAjaxUploader({
action: '/Project/ImageUpload',
allowedExtensions: ['jpg', 'jpeg', 'png', 'gif'],
params: {
Logo: true,
ProjectID: "@HttpUtility.JavaScriptStringEncode(Model.ID.ToString(), false)"
}
});
});
</script>
}
 
<div class="space-container">
<h3>@ViewBag.Title</h3>
<p class="sub-title">Entre com os dados do projeto. Dependendo da avaliação este projeto pode aparecer na página principal.</p>
</div>
 
@using (Html.BeginForm(null, null, Request.QueryString.ToRouteValueDictionary(), FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Scripts.JQueryErrorTemplate()
@Html.AntiForgeryToken()
<fieldset id="projectFields">
<legend>Dados do Projeto</legend>
@Html.ValidationSummary(true)
@Html.EditorForModel()
</fieldset>
@Form.Status("salvando")
<div class="buttons-container">
<input type="submit" value="Salvar" title="Salvar" />
</div>
}
This_code_does_WORK.cshtml
C#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
@using BindSolution.Framework.Web.Extensions
@model ProjectViewModel
@{
ViewBag.Title = "Novo Projeto";
}
@section scripts {
 
<script type="text/javascript">
$(function() {
$('#Logo').bindAjaxUploader({
action: '/Project/ImageUpload',
allowedExtensions: ['jpg', 'jpeg', 'png', 'gif'],
params: {
Logo: true,
ProjectID: "559b0505-09f2-4385-aee0-530d79c82803"
}
});
});
</script>
}
 
<div class="space-container">
<h3>@ViewBag.Title</h3>
<p class="sub-title">Entre com os dados do projeto. Dependendo da avaliação este projeto pode aparecer na página principal.</p>
</div>
 
@using (Html.BeginForm(null, null, Request.QueryString.ToRouteValueDictionary(), FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Scripts.JQueryErrorTemplate()
@Html.AntiForgeryToken()
<fieldset id="projectFields">
<legend>Dados do Projeto</legend>
@Html.ValidationSummary(true)
@Html.EditorForModel()
</fieldset>
@Form.Status("salvando")
<div class="buttons-container">
<input type="submit" value="Salvar" title="Salvar" />
</div>
}
This_code_does_WORK_COMPILED(SourceGenerated_Complete).cshtml
C#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611
<!--
This complete generated code
-->
 
 
 
<!DOCTYPE html>
<html lang="pt-br" class="no-js">
<head>
<meta charset="utf-8" />
<title>Novo Projeto</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/2.9.0/build/reset/reset-min.css">
<link href="/DefaultStyle?v=2716989745269783766" type="text/css" rel="stylesheet" />
<link href="http://fonts.googleapis.com/css?family=PT+Sans+Caption:regular,bold" rel="stylesheet" type="text/css">
<script src="/JsHeader?v=1795947085686908421" type="text/javascript"></script>
 
</head>
<body>
 
<div id="header-title">
<div class="center">
<a class="bind-logo" href="/">bind solution</a>
<p class="bind-sublogo">desenvolvimento web</p>
<ul id="top-menu">
 
<li>
<a id="dashboard-menu" href="#">Dashboard </a>
</li>
<li id="username-menu">
<p>Riderman | contato@bindsolution.com</p>
<a class="link" href="/Account/MyProjects">Acompanhar projetos</a>
<a class="link" href="/Account/MyInfo">Conta</a>
<a class="link" href="/Account/LogOut">Sair</a>
</li>
</ul>
</div>
</div>
<div id="wrap" class="center">
});
 
});
</script>
}
 
<div class="space-container">
<h3>Novo Projeto</h3>
<p class="sub-title">Entre com os dados do projeto. Dependendo da avaliação este projeto pode aparecer na página principal.</p>
</div>
 
<form action="/Project/Create" enctype="multipart/form-data" method="post"> <!-- JsRender -->
<script id="span-error" type="text/x-jQuery-tmpl">
<span for="{{=name}}" generated="true" class="">{{=message}}</span>
</script>
<input name="__RequestVerificationToken" type="hidden" value="3C5KXBaavfU7L1g5Nj4q7RSWAuMaaAdwSWzzjJJFhMrtDBmz5U6rytVQaGPGg3QBQHk8/YSC4QJ+3x2LgMT2uGZRnE7885HsRMmKh4znvPSUL/YLq/hDuUxZoY4oGC1hO1wZGeDZ4pma14nGmb9jVHz0MVF2hxL9DPGi6Ji/gpPoJ06YeD21SmhQm5add4+WZCyzMspTsmygb7HpXf4rKg==" /> <fieldset id="projectFields">
<legend>Dados do Projeto</legend>
 
<input id="ID" name="ID" type="hidden" value="41b812d8-5817-45bb-b981-2a0a21ebaccf" />
<div class="editor-label">
<label for="Name">Nome</label>
</div>
<div class="editor-field">
<input class="text-box single-line" data-val="true" data-val-length="deve conter entre {0} e {1} caract&amp;#233;res" data-val-length-max="60" data-val-length-min="5" data-val-required="campo obrigat&amp;#243;rio" id="Name" name="Name" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="Name" data-valmsg-replace="true"></span>
</div>
<div class="editor-label">
<label for="UrlKeyword">Palavra chave</label>
</div>
<div class="editor-field">
<input class="text-box single-line" data-val="true" data-val-length="deve conter entre {0} e {1} caract&amp;#233;res" data-val-length-max="35" data-val-length-min="5" data-val-required="campo obrigat&amp;#243;rio" id="UrlKeyword" name="UrlKeyword" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="UrlKeyword" data-valmsg-replace="true"></span>
</div>
<div class="editor-label">
<label for="Url">Link</label>
</div>
<div class="editor-field">
<input class="text-box single-line" data-val="true" data-val-length="deve conter entre {0} e {1} caract&amp;#233;res" data-val-length-max="180" data-val-length-min="10" data-val-regex="Link inv&amp;#225;lida" data-val-regex-pattern="^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?$" data-val-required="campo obrigat&amp;#243;rio" id="Url" name="Url" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="Url" data-valmsg-replace="true"></span>
</div>
 
<div class="editor-label">
<label for="Logo">Logo</label>
</div>
<div class="editor-field">
<div id="Logo" >
<noscript>
<input id="Logo" name="Logo" type="file" value="" />
</noscript>
</div>
<span class="field-validation-valid" data-valmsg-for="Logo" data-valmsg-replace="true"></span>
</div>
<div class="editor-label">
<label for="Rate">Nota</label>
</div>
 
<div class="editor-field">
<input data-val="true" data-val-number="The field Nota must be a number." data-val-range="deve estar entre {0} e {1}" data-val-range-max="10" data-val-range-min="0" data-val-required="campo obrigat&amp;#243;rio" id="Rate" name="Rate" type="text" value="0" />
<span class="field-validation-valid" data-valmsg-for="Rate" data-valmsg-replace="true"></span>
</div>
 
<div class="editor-label">
 
<label for="Description">Descri&#231;&#227;o</label>
 
</div>
 
<div class="editor-field">
 
<textarea class="text-box multi-line" data-val="true" data-val-length="deve conter entre {0} e {1} caract&amp;#233;res" data-val-length-max="255" data-val-length-min="5" data-val-required="campo obrigat&amp;#243;rio" id="Description" name="Description">
 
</textarea>
 
<span class="field-validation-valid" data-valmsg-for="Description" data-valmsg-replace="true"></span>
 
</div>
 
 
 
<div class="editor-label">
 
<label for="Details">Detalhes</label>
 
</div>
 
<div class="editor-field">
 
<textarea class="text-box multi-line" data-val="true" data-val-required="campo obrigat&amp;#243;rio" id="Details" name="Details">
 
</textarea>
 
<span class="field-validation-valid" data-valmsg-for="Details" data-valmsg-replace="true"></span>
 
</div>
 
</fieldset>
 
<div class="status">
 
<span class="loading">
 
<div class="spin"></div>
 
</span>
 
<span class="message" >salvando</span>
 
</div>
 
<div class="buttons-container">
 
<input type="submit" value="Salvar" title="Salvar" />
 
</div>
 
</form>
 
 
 
</div>
 
 
 
<div id="footer" class="three-columns">
 
 
 
<div class="column" id="twitters">
 
<a href="http://twitter.com/#!/bindsolution" title="Siga-me no twitter">
 
<img src="/Images/follow-twitter.png" id="follow-twitter" alt="Twitters" />
 
</a>
 
 
<a href="https://twitter.com/bindsolution" target="_blank" data-text-color="#FBFBFB" data-link-color="#FBFBFB" data-show-count="false" data-button="grey" data-lang="pt" class="twitter-follow-button"><h4>@bindsolution</h4></a>
 
 
<script id="twitterEntryTmpl" type="text/x-jquery-tmpl">
 
<li>
 
<div class="content">{{=text}}</div>
 
<p class="time message">{{=$ctx.twitterPrettyDate(created_at)}}</p>
 
</li>
 
</script>
 
<div class="status">
 
<span class="loading">
 
<div class="spin"></div>
 
</span>
 
</div>
 
 
 
<ul id="twitter-feed">
 
<noscript>
 
 
 
 
<li>
 
<div class="content">
 
O site da Bind ? Em breve, muito breve! A espera vai valer a pena! Garantimos! =)
 
</div>
 
<p class="time message">2 horas, 7 minutos atr&#225;s</p>
 
</li>
 
<li>
 
<div class="content">
 
uhauh Recebi um presente da Google \o/ @<em>bindsolution</em>
 
</div>
 
<p class="time message">5 horas, 19 minutos atr&#225;s</p>
 
</li>
 
<li>
 
<div class="content">
 
Hoje a Bind recebeu um presente da @<a class=" " href="http://twitter.com/Google">Google</a>. Obrigado @<a class=" " href="http://twitter.com/Google">Google</a> pelo brinde e pelos créditos de R$450,00 para utilizar no AdWords. =)
 
</div>
 
<p class="time message">5 horas, 20 minutos atr&#225;s</p>
 
</li>
 
<li>
 
<div class="content">
 
Dormir pra q? Sonhando sua produtividade é 0!! 4:30 da madrugada e a @<em>bindsolution</em> produzindo! =) <a href="http://search.twitter.com/search?q=%23working" title="#working" class=" ">#working</a>
 
</div>
 
<p class="time message">1 semana atr&#225;s</p>
 
</li>
 
 
 
</noscript>
 
</ul>
 
</div>
 
 
 
<div class="column" id="partners">
 
<h4>Parceria
 
<a href="https://partners.microsoft.com/" target="_blank" title="Blog da Bind">Microsoft</a>
 
</h4>
 
<p>A Bind Solution é parceira Microsoft MPN. Todos os nossos sites são desenvolvidos utilizando tecnologias Microsoft.</p>
 
<h4>Soluções
 
<a href="http://www.google.com/apps/intl/pt-BR/group/index.html" target="_blank" title="Blog da Bind">Google</a>
 
</h4>
 
<p>Além do desenvolvimento de sites, ajudamos também o cliente com soluções de email, calendário e documentos da Google.</p>
 
</div>
 
 
 
<div class="column" id="blog">
 
<h4>Atualizações
 
<a href="http://blog.bindsolution.com" target="_blank" title="Blog da Bind">Blog</a>
 
</h4>
 
<a href="http://blog.bindsolution.com/rss" target="_blank" title="Assinar RSS">
 
<img src="/Images/rss.png" class="rss" alt="Rss" />
 
</a>
 
 
 
<script id="blogEntryTmpl" type="text/x-jquery-tmpl">
 
<li>
 
<div class="blog-date">
 
<img src="/Images/calendar.png" alt="Calendário" />
 
<span class="blog-dateDay">{{getDay publishedDate}}</span>
 
<span class="blog-dateMonth">{{getMonthName publishedDate}}</span>
 
</div>
 
<div class="blog-text">
 
<a href="{{=link}}" target="_blank" title="{{=title}}">
 
<h4>{{=title}}</h4>
 
</a>
 
<p>{{=contentSnippet}}</p>
 
</div>
 
</li>
 
</script>
 
<div class="status">
 
<span class="loading">
 
<div class="spin"></div>
 
</span>
 
</div>
 
 
 
<ul id="blog-feed">
 
<noscript>
 
 
 
 
<li>
 
<div class="blog-date">
 
<img src="/Images/calendar.png" alt="Calendário" />
 
<span class="blog-dateDay">20</span>
 
<span class="blog-dateMonth">set</span>
 
</div>
 
<div class="blog-text">
 
<a href="http://feedproxy.google.com/~r/BindSolution/~3/P4OOIpwNzUE/10465049879" target="_blank" title="Guia de introdu&#231;&#227;o ao AdWords">
 
<h4>Guia de introdu&#231;&#227;o ao AdWords</h4>
 
</a>
 
<p>Guia de introdução ao AdWords: Lançamos uma série de videos sobre o AdWords nesta semana.
Para...<img src="http://feeds.feedburner.com/~r/BindSolution/~4/P4OOIpwNzUE" height="1" width="1"/></p>
 
</div>
 
</li>
 
<li>
 
<div class="blog-date">
 
<img src="/Images/calendar.png" alt="Calendário" />
 
<span class="blog-dateDay">20</span>
 
<span class="blog-dateMonth">set</span>
 
</div>
 
<div class="blog-text">
 
<a href="http://feedproxy.google.com/~r/BindSolution/~3/Z2ezSKI6ujk/10446038623" target="_blank" title="Novidades no site da bind">
 
<h4>Novidades no site da bind</h4>
 
</a>
 
<p>Novidades no site da bind: Publicamos algumas modificações no nosso site Novidades no site da...<img src="http://feeds.feedburner.com/~r/BindSolution/~4/Z2ezSKI6ujk" height="1" width="1"/></p>
 
</div>
 
</li>
 
<li>
 
<div class="blog-date">
 
<img src="/Images/calendar.png" alt="Calendário" />
 
<span class="blog-dateDay">17</span>
 
<span class="blog-dateMonth">set</span>
 
</div>
 
<div class="blog-text">
 
<a href="http://feedproxy.google.com/~r/BindSolution/~3/ZLsYDu1sEV8/10325395099" target="_blank" title="Aprenda os termos b&#225;sicos de AdWords neste v&#237;deo.">
 
<h4>Aprenda os termos b&#225;sicos de AdWords neste v&#237;deo.</h4>
 
</a>
 
<p><iframe width="400" height="225" src="http://www.youtube.com/embed/WXO1w_pgtDM?wmode=transparent&autohide=1&egm=0&hd=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=0&showsearch=0" frameborder="0" allowfullscreen></iframe><br/><br/><p>Aprenda os termos básicos de AdWords neste vídeo.</p><img src="http://feeds.feedburner.com/~r/BindSolution/~4/ZLsYDu1sEV8" height="1" width="1"/></p>
 
</div>
 
</li>
 
 
 
</noscript>
 
</ul>
 
</div>
 
 
 
<p id="copy">Todos os direitos reservados - Copyright 2011 - Bind Solution</p>
 
</div>
 
 
 
 
 
 
<!-- Twitter -->
 
<script src="https://platform.twitter.com/widgets.js" type="text/javascript"></script>
 
<script src="https://platform.twitter.com/anywhere.js?id=EunN3LrclOH2OPqAfhmaQ&v=1" type="text/javascript"></script>
 
<!-- Jquery -->
 
<script src="http://code.jquery.com/jquery-1.7.min.js" type="text/javascript"></script>
 
<!-- Google API -->
 
<script src="https://www.google.com/jsapi?key=ABQIAAAAPb9MTXY8i7ei3VuESqlCRxRQ637ZpsULcjNHlUVl9Td_Qv4dnRS9D8oCSwm9F7BNJjjoiMfo_pWPiw" type="text/javascript"></script>
 
<!-- Spin (loading 'gif') -->
 
<script src="http://fgnass.github.com/spin.js/spin.min.js" type="text/javascript"></script>
 
<!-- Bind -->
 
<script src="/js?v=-8983893275883487158" type="text/javascript"></script>
 
 
<!-- Others-->
 
<script type="text/javascript">
 
 
 
google.load("feeds", "1");
 
google.setOnLoadCallback(LoadBlogFeeds);
 
LoadTwitterFeeds();
 
 
 
SetCookie("JsEnabled", true);
 
 
twttr.anywhere(function (T)
 
{
 
T("#twitter-feed").hovercards();
 
});
 
 
 
var s = new LoaderProgress("#twitters .status");
 
$("#messages .close").click(function (e)
 
{
 
e.preventDefault();
 
var size = $(this).parents("ul#messages").children().length;
 
if (size == 1)
 
{
 
$(this).parents("ul#messages").slideUp(function ()
 
{
 
$(this).remove();
 
});
 
}
 
else
 
{
 
$(this).parent("li").slideUp(function ()
 
{
 
$(this).remove();
 
});
 
}
 
});
 
 
</script>
 
 
 
 
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js" ></script>
 
<script src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.min.js" ></script>
 
 
 
 
 
<script type="text/javascript">
 
$(function() {
 
$('#Details').wysiwyg({
 
initialContent: ""
 
,controls: {
 
createLink: { visible: false },
 
insertImage: { visible: false }
 
}
 
});
 
 
$('form').bindAjaxPost();
 
 
$('#Logo').bindAjaxUploader({
 
action: '/Project/ImageUpload',
 
allowedExtensions: ['jpg', 'jpeg', 'png', 'gif'],
 
 
params: {
 
Logo: true,
 
ProjectID: "41b812d8-5817-45bb-b981-2a0a21ebaccf"
 
 
 
 
 
<script type='text/javascript' id='glimpseData' src='/Glimpse.axd?v=0.86&amp;r=data.js&amp;id=aea966c4-ee6d-4619-80c7-e5a8597a5403'></script><script type='text/javascript' id='glimpseClient' src='/Glimpse.axd?v=0.86&amp;r=client.js'></script></body>
 
</html>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.