webforms

Using jQuery for AJAX with ASP.NET Webforms

微笑、不失礼 提交于 2019-12-27 11:09:18
问题 Anyone know of a link to a good article/tutorial for getting started using jQuery for AJAX calls rather than ASP.NET AJAX? I'm trying to avoid using UpdatePanels entirely in this app, which I haven't been able to accomplish in the past. 回答1: The most complete article I've ever found about this topic http://www.codeproject.com/KB/ajax/AjaxAndAspNET.aspx It avoids update panel, script manager and viewstate. 回答2: Here are few links: A Look Into JQuery API http://gridviewguy.com/Articles/407_A

Dropdownlist control with <optgroup>s for asp.net (webforms)?

随声附和 提交于 2019-12-27 10:53:08
问题 Can anyone recommend a dropdownlist control for asp.net (3.5) that can render option groups? Thanks 回答1: I've used the standard control in the past, and just added a simple ControlAdapter for it that would override the default behavior so it could render <optgroup>s in certain places. This works great even if you have controls that don't need the special behavior, because the additional feature doesn't get in the way. Note that this was for a specific purpose and written in .Net 2.0, so it

Dropdownlist control with <optgroup>s for asp.net (webforms)?

丶灬走出姿态 提交于 2019-12-27 10:53:02
问题 Can anyone recommend a dropdownlist control for asp.net (3.5) that can render option groups? Thanks 回答1: I've used the standard control in the past, and just added a simple ControlAdapter for it that would override the default behavior so it could render <optgroup>s in certain places. This works great even if you have controls that don't need the special behavior, because the additional feature doesn't get in the way. Note that this was for a specific purpose and written in .Net 2.0, so it

Does form data still transfer if the input tag has no name?

断了今生、忘了曾经 提交于 2019-12-27 09:04:48
问题 For efficiency purposes I am wondering if a file or text in a textarea still gets transferred to the server if you omit the name attribute or set it to null. eg <input type="file" id="file" name=""> <textarea id="text" name=""> I notice that the data is not available at the server if you do this. 回答1: The W3C specification, if I understand it correctly, mandates that every form input element has a name attribute specified. Otherwise that element will not be processed. Source 回答2: No. I

Does form data still transfer if the input tag has no name?

泪湿孤枕 提交于 2019-12-27 09:04:18
问题 For efficiency purposes I am wondering if a file or text in a textarea still gets transferred to the server if you omit the name attribute or set it to null. eg <input type="file" id="file" name=""> <textarea id="text" name=""> I notice that the data is not available at the server if you do this. 回答1: The W3C specification, if I understand it correctly, mandates that every form input element has a name attribute specified. Otherwise that element will not be processed. Source 回答2: No. I

fill out a webform that uses javascript with python

两盒软妹~` 提交于 2019-12-25 18:19:42
问题 i am trying to fill out a webform using a python program by submitting specific values. the problem is it uses javascript. i will post an example of the value i want to fill. fo.addVariable("email","email@yahoo.com") fo.addVariable("age","19") fo.addVariable("gender","M") fo.addVariable("line","hello") that is an example of the value on the page. what i want to do is submit a value to that and change it. what i am currently attempting is this: data = urllib.parse.urlencode({"line": "hello",

Urlrewriting.net IsPostBack always false

谁说胖子不能爱 提交于 2019-12-25 14:04:25
问题 I am working on rewriting URLs Urlrewriting.net, and have run into what seems to be a common problem but I can seem to fix it. I'll present a simplified case. The URL rewriting is working perfectly with the rule: <urlrewritingnet rewriteOnlyVirtualUrls="true" defaultPage="default.aspx" defaultProvider="RegEx" xmlns="http://www.urlrewriting.net/schemas/config/2006/07"> <rewrites> <add name="catalog" virtualUrl="^~/catalog/(.*)/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString"

How can I do a partial page update with ajax using Sitecore?

别来无恙 提交于 2019-12-25 12:25:35
问题 I have a specific page (sitecore content item) in my web application composed of a sitecore layout and many sublayouts. One of those sublayouts is a user control that I would like to have refreshed once a certain button is clicked. I would like only that sublayout to be refreshed and the rest of the page to remain unchanged (typical ajax situation here). How do I accomplish this with sitecore when all of my sitecore content items are directly related to a full page in my web application

how to insert DateTime.Now values into datetime type field in sql database

橙三吉。 提交于 2019-12-25 12:01:05
问题 my code is : SqlConnection cn = new SqlConnection("Data Source=.;Initial Catalog=haftehbazardb;Integrated Security=True "); SqlCommand cmd = cn.CreateCommand(); cmd.CommandText = string.Format("Insert into Table_test(date1,date2) Values({0},{1})", DateTime.Now, DateTime.Now.AddDays(21)); cn.Open(); cmd.ExecuteNonQuery(); cn.Close(); Label1.Text = "Insert is done successfuly!"; I can insert evry type values into database.but i can not insert datetime.now or datetime.now.addday(21) into this

Override HttpContext.Current.User.Identity.Name

三世轮回 提交于 2019-12-25 12:00:24
问题 I am trying to hook into the Web Forms ASP.NET pipeline and extend the HttpContext.Current.User.Identity in such a way that the Name property returns a custom implementation. One possible approach which I have found in another answer that it is possible to add new properties by adding claims. The two questions I have are: Where to add the claims in the ASP.NET Web Forms pipeline? And Is it possible to override the existing Name property? 回答1: You can implement the PostAuthenticate event in