I'm using the PagingBulletedListExtender with an IndexSize="1". This displays alphanumerics relevant to the list items.
Is there a way of having all items in the collection be displayed?
Never mind - this has now been accomplished using JQuery.
Related
The question in a nutshell: Is there a way to add forms dynamically to a aspx-page? I know how to add controls to an existing form, but how to add a whole form?
Bckground:
I am "forced" to work in Visual Studio 2008 and I want to create a controller, which builds a page depending from the list of elements a model gives it (e.g.: the list may contain a paragraph, an image, another paragraph, a parapgraph again, a form and so on).
This works fine for the first examples as I am able to add them to the inner-html of a div-container.
Thinking about ways to generate a form like this (innerHTML += form), I feel I'd be throwing the few possible advantages ASP I can see (compared to PHP) out of the window in terms of input validation and so on. But I can't find a way to generate a "real, server-run" form. The same goes for gridviews, but I guess the solution may be similar.
A possible workaround would be to create an empty form
<form runat="server" id="dummyForm">...
and add controls to it dynamically. The obvious(?) downside to this would be, that I couldn't change its position (at least I wouldn't know how) in relation to the other content elements.
Another downside would be that I would be limited to one form per page and that may or may not be sufficient. If it wasn't I would starting to add several empty dummy-forms and would start indexing them and all of that doesn't look very cool to me.
Is there a more elegant way to a solution?
TIA
Simon
You can't add more than once server side Form tag in single aspx file
(in run time or design time)
maybe this article help you to generate dynamic forms :
https://msdn.microsoft.com/en-us/library/aa479330.aspx
I search a Script / Expansion / Way to have a tooltip like this:
http://s3.imgimg.de/uploads/Untitled37105acbpng.png
That means:
- it must be easy to handle within GridViews (specially in RowBound-Events, so every Row will have a own Tooltip for a coloum).
- Must be have the option for delay when hover over the item (I don't like the default ASP.ToolTip because you can't set the delay down!)
Hoe you have an idea :)
You could use f.e. this jQuery plugin.
Here are some links to get started:
Using jQuery To Create Stunning Tooltips in your ASP.NET Applications
Displaying-Row-Details-Tooltip-on-GridView-using-JQuery
I'm customizing a NewForm.aspx page and I've created a few new SharePoint:FormFields in the form of textboxes. I'm looking to customize the height of these boxes on a case-by-case basis, but I can't figure it out.
I've looked into DisplaySize, but that only controls the width of a specific textboxe, and I've seen adding in:
style> .ms-long{width:100px;} </style>
but that changes every SharePoint:FormField size, not just one.
Any help would be great! Thanks!
I've done this before using jQuery. With jQuery you can query dom elements (ie. fields) by an attribute of your choice (e.g. the attribute title) and the manipulate it. See Jan Tielens Series about integrating SharePoint and jQuery. http://weblogs.asp.net/jan/archive/2008/11/20/sharepoint-2007-and-jquery-1.aspx
Or just google sharepoint + jquery.
DataTextField="Name"
DataValueField="ID_ListGroupParIzm"
???? DataValueField2="ID_Point"
is it real to load 2 values from sqlDataSource in one DropDown list ? Get structure object from sqlDataSource ?
I can see only one way - making a new table to combine ID_Point and ID_ListGroupParIzm to one ID but that's really weird.
The only reason I can see for trying to do this is so that you can use javascript to affect two other objects on the page when something is selected.
If that is the case, I would strongly suggest using css classes instead and using jQuery (or another similar framework to select them from the dom.
eg.
<div id="ctl00_point" class="point item1">Content</div>
<div id="ctl00_listgrouppartzm" class="lgpartzm item1">Content</div>
<div id="ctl01_point" class="point item2">Content</div>
<div id="ctl01_listgrouppartzm" class="lgpartzm item2">Content</div>
Now rather than trying to store "point1|listgrouppartzm1" into the value of the drop down list and then parse it out, you only have to store "item1" and you have all the information you need to find those two divs.
In jQuery, you can get them both by
$(".item1")
or individually by
$(".item1.point")
$(".item1.lgpartzm")
You need to combine two fields before data-binding to the dropdownlist.
I think it's the only way to do it.
It is possible to add multiple reCAPTCHAS in one form? I tried doing so, even giving the multiple reCAPTCHAS different IDs, but when I load the page in the browser, only one of them is shown.
Is this by design? I need the two reCAPTCHAS because one is for Login, and the other one is for the Register form, which will be shown on the same page.
Thanks!
WT
Only one Cpatcha is supported in a page at any time. What you can do is use AJAX and lod captcha after the form is loaded.
This might of some help.
After a quick google search, it appears that it's not currently possible. One suggestion I saw was to pop up a modal recaptcha just as the user submits the form. ondemandcaptcha for Ruby.
I was initially lead by this thread to believe there is no simple answer, but after digging through the Recaptcha ajax library I can tell you this isn't true! TLDR, working jsfiddle: http://jsfiddle.net/Vanit/Qu6kn/
It's possible to overwrite the Recaptcha callbacks to do whatever you want with the challenge. You don't even need a proxy div because with the overwrites the DOM code won't execute. Call Recaptcha.reload() whenever you want to trigger the callbacks again.
function doSomething(challenge){
$(':input[name=recaptcha_challenge_field]').val(challenge);
$('img.recaptcha').attr('src', '//www.google.com/recaptcha/api/image?c='+challenge);
}
//Called on Recaptcha.reload()
Recaptcha.finish_reload = function(challenge,b,c){
doSomething(challenge);
}
//Called on page load
Recaptcha.challenge_callback = function(){
doSomething(RecaptchaState.challenge)
}
Recaptcha.create("YOUR_PUBLIC_KEY");
It is now possible to do this easily with explicit recaptcha creation. See my answer here:
How do I show multiple recaptchas on a single page?
It's not too difficult to load each Recaptcha only when needed using the Recaptcha AJAX API, see my post here:
How do I show multiple recaptchas on a single page?
the captcha has an img element #recaptcha_challenge_image element , so after you set the recaptcha in one div say "regCaptch",get that img src attr
,set your other captcha div html to the old one html and then set the #recaptcha_challenge_image src to the src you get , here is a working example
var reCaptcha_src = $('#recaptcha_challenge_image').attr('src');
$('#texo').html($('#regCaptch').html());
$('#recaptcha_challenge_image').attr('src',reCaptcha_src);