我正在使用ckeditor格式化我的内部数据 textarea
<textarea id="editorAbout" rows="70" cols="80" name="editorAbout"></textarea>
Run Code Online (Sandbox Code Playgroud)
现在,当我尝试使用jQuery.ajax这样的方式发布此数据时,
var about=escape( $("#editorAbout").text());
$.ajax({
type: "POST",
url: "../Allcammand.aspx?cmd=EditAboutCompany&about="+about,
type:"post",
async: false ,
success: function(response){
},
error:function(xhr, ajaxOptions, thrownError){alert(xhr.responseText); }
});
Run Code Online (Sandbox Code Playgroud)
我收到了错误
HTTP错误414.请求URL太长.
我在这里收到错误:http://iranfairco.com/example/errorLongUrl.aspx
尝试单击该页面左下角的" 编辑文本"按钮.
为什么会这样?我该如何解决?
我遵循了来自网络的请求代码
StringBuilder sb = new StringBuilder();
byte[] buf = new byte[8192];
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://api.bigflix.com/BIGFlixApi.do?parameter=getProductType&partnerID=17&uniqueID=54325345435×tamp=131286916367&digest=bf53cae8f364cfc1d796489d09e4cfd  <br>");
HttpWebResponse responce = (HttpWebResponse)request.GetResponse();
Stream resstream = responce.GetResponseStream();
string tempString = null;
int count = 0;
do
{
count = resstream.Read(buf, 0, buf.Length);
if (count != 0)
{
tempString = Encoding.ASCII.GetString(buf, 0, count);
sb.Append(tempString);
}
}
while (count > 0);
{
Response.Write(sb.ToString() + "<br/><br/>");
// string[] val = sb.ToString().Split('"');
}
Run Code Online (Sandbox Code Playgroud)
运行此代码后,我将得到这种类型的json
[
{ "id": 23, "name": "Video Clips" },
{ "id": 15, "name": "Deleted Scenes" …Run Code Online (Sandbox Code Playgroud) 我在C#(ASP.NET)中编码并使用Forms身份验证.
我想知道哪个是更改用户密码的最佳方法,而不使用asp:ChangePassword控件.
我不想使用重置密码方法.
我只想获取文本框中的密码并将其替换为旧密码.
请注意我使用的PasswordFormat是passwordFormat ="Hashed"
一些代码片段会有所帮助
编辑:
在我的web.config中,我设置了enablePasswordRetrieval ="false"
我使用了以下方法
var myUser = Membership.GetUser(userID);
bool isChangeSuccess = myUser.ChangePassword(
myUser.GetPassword(),
ActivateUserPasswordText.Text.Trim());
Run Code Online (Sandbox Code Playgroud)
它给了我错误,
此成员资格提供程序尚未配置为支持密码检索.
可以做些什么来解决这些问题?我真的希望我的PasswordFormat是哈希本身.
此致,
Naveen Jose
因此,我想在画布上绘制一条线(在3d中),并在鼠标拖动该线(拖动它的一些点)时使其可旋转(在3d中)(更好地使用任何类似专用的lib - 纯粹没有libs JS. ..)?
我正在尝试将一些简单的参数发布到.asmx webservice.
我收到以下错误:请求格式无效:application/json; 字符集= UTF-8.
我真正需要的是能够传递一个复杂的对象,但我无法通过json内容类型发出POST请求.
这是我的WebService定义
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public int JsonTest2(int myparm1, int myparm2)
{
return 101;
}
Run Code Online (Sandbox Code Playgroud)
这是我的javascript代码
function JsonTest2() {
$.ajax({
type: 'POST',
url: "http://localhost/WebServices/MyTest.asmx/JsonTest2",
data: "{myparm1:105,myparm2:23}",
contentType: 'application/json; charset=UTF-8',
dataType: 'json',
async: false,
success: function (msg) {
alert(msg);
},
error: function (msg) {
alert('failure');
alert(msg);
}
});
}
Run Code Online (Sandbox Code Playgroud) 我见过很酷的ASP.NET MVC域路由实现.
资料来源:http://blog.maartenballiauw.be/post/2009/05/20/ASPNET-MVC-Domain-Routing.aspx
这可以在ASP.NET WebForms 4.0上完成吗?
我无法将Facebook访问令牌的到期时间延长到60天.我在Facebook开发者页面上阅读了几篇文章:https: //developers.facebook.com/roadmap/offline-access-removal/
具体来说,我正在使用Facebook C#SDK,当我要求身份验证时,我正在做FacebookClient.GetLoginUrl(),并通过调用来获取访问令牌.
在那之后,我尝试使用FacebookClient.GetAsync("oauth/access_token")通过使用以下URL模式来延长到期时间
https://graph.facebook.com/oauth/access_token?
client_id=APP_ID&
client_secret=APP_SECRET&
grant_type=fb_exchange_token&
fb_exchange_token=EXISTING_ACCESS_TOKEN
Run Code Online (Sandbox Code Playgroud)
但是,我没有看到access_token的过期时间被延长.我确实将我的应用设置为使用已弃用的offline_access ...任何人都有使用Facebook C#SDK的经验,可以给我一些想法吗?
我误解了"延长过期时间"的含义是否意味着在Facebook doc中?
非常感谢你!
我想在对话框中使用jquery datepicker.应该在焦点上触发日期选择器(默认值).由于文本框是对话框中的第一个字段,因此它自动具有焦点.当首先打开对话框时,这会产生打开日期选择器的不良影响.
我尝试了很多不同的东西,比如将焦点设置为虚拟href,在对话框打开后调用datepicker('close'),将showOn设置为'button',然后在对话框打开后更改为'focus'但不起作用.
只有在文本框获得焦点时才应呈现日期选择器,但对话框首先打开时除外.
我的片段
$(function() {
$('#btnDialog').click(function() {
$('#myDate').datepicker({
title: 'Test Dialog'
});
$('#myDialog').dialog();
});
});?
Run Code Online (Sandbox Code Playgroud)
JS小提琴链接:http://jsfiddle.net/UkTQ8/
我正在尝试为jquery文件上传取消按钮(http://blueimp.github.io/jQuery-File-Upload/).
我的代码:
var jqXHR = $('#fileupload').fileupload({
url: 'server/index.php',
dataType: 'json',
dropZone: $('#dropzone'),
})
$('button.cancel').click(function (e) {
jqXHR.abort();
alert("cancel");
});
Run Code Online (Sandbox Code Playgroud)
当我点击取消按钮时,取消按钮不起作用,我得到"jqXHR.abort不是一个功能"错误.
取消按钮取消文件上传工作需要做什么?
如何创建一个带+和 - 按钮的输入框.点击哪个用户可以更改所选产品的数量,例如此屏幕:
