Hi,
i wrote a page (only class that derives from System.Web.UI.Page, that i want to use in more websites. I dynamically add webcontrols to Page.Controls collection like this:
Panel p = new Panel();
p.Style.Add("float", "left");
p.Controls.Add(locLT);
Page.Controls.Add(p);
this code renders only
<div style="float:left;">
</div>
Ho...
Hi this may seem like a weird question, but here's my situation:
I have a form where the user can click and add rows which contain certain input fields. This is strictly done on client side using JQuery. I can access the input values on postback on asp.net side using Request.Form and the name of the fields, which is fine. The problem...
Have a master page. The content page has a list with hyperlinks containing request variables. You click on one of the links to go to the page containing the radiobuttonlist (maybe).
First problem: When I get to the new page, I use one of the variables to determine whether to add a radiobuttonlist to a placeholder on the page. I tried...
I have a select field that is dynamically populated with an ajax call that simply returns all the HTML select options. Here is the part of the PHP that just echo's the select tags and dynamically fills out each option/value.
echo "<select name='player1' class='affector'>";
echo "<option value='' selected>--".sizeof($start)." PLAYERS LO...
Hello all,
I am creating a button dynamically in my code and attaching a click event to it. However I have to prevent people to click it while there is a process going on. So when it is clicked once, it should be disabled and when the process ends it should be enabled. How can I do that?
Thanks.
...
I have a page that needs to load several dynamically generated images. Everything works fine 90% of the time, but sometimes some of the images are not generated (I just get the missing image icon instead). Since most of the times it works, and the missing images are not always the same, I think that maybe it has something to do with the ...
I'm new to javascript and a novice programmer, so this might be a really easy question to answer. I would like to loop over the values of x number of fields and add them up to display the sum in a final field. I can perform this function if I explicitly call each field, but I want to abstract this so I can deal with a flexible number of ...
I have a table made up of a row of 3 input elements: Price, Quanity, and Total. Under that, I have two links I can click to dynamically generate another row in the table. All that is working well, but actually calculating a value for the total element is giving me trouble. I know how to calculate the value of the first total element but ...
var val1=document.createElement("input");
val1.setAttribute('type',"image");
val1.setAttribute('src',"../images/delete.gif");
val1.setAttribute('id',chkid);
val1.setAttribute('name',"val2");
val1.setAttribute('class',"mylist2");
val1.onclick=function(){var block=document.getElementById("repeat_ul");
var obj=document.getElementByI...
hi all,
hope that everybody here is OK.
We are using VS 2008 as development tool, TFS 2008 as version control as well as build automation. Some of our developer use dbpro for databases changes and some use SQL Server management studio.
I am trying to automate build for Web Application built using C# and VB.Net.
Our scenario is such tha...
I have this code in a js file:
function buildRolePicker() {
var pnl = $("[id$='staffRoles']");
$.each(roles["ContactGroupRoles"], function(iteration, item) {
pnl.append(
$(document.createElement("input")).attr({
id: 'cgr' + item['RoleId'],
name: 'cgroles',
...
Hi guys
My english very terrible, so i cant explain very clear. I will try my best.
is it possible to generate HTML code from within ASP.NET MVC, please?
This is Controller
public class HomeController : Controller
{
public ActionResult Index()
{
ViewData["Message"] = "Hello ASP.NET MVC!";
ViewData["author"] = ...
For simplicity's sake, I've included a script that dynamically calls a function by its name:
var foo = "hello";
var bar = "world";
var function_name = "say_" + foo + bar;
// Since its name is being dynamically generated, always ensure your function actually exists
if (typeof(window[function_name]) === "function")
{
window[function_...
Hello there,
Using ASP.Net MVC1 and am dynamically creating the html in a model that is then dropped into the view and rendered at run time.
My view is a single page that looks like this:
<%@ Page Language="VB" Inherits="System.Web.Mvc.ViewPage" %>
<%=(ViewData("Content"))%>
This dynamically created content is mostly dropdownlis...
I have a programmatically generated image that I want to send as an attachment via the ACTION_SEND and EXTRA_STREAM method.
But how do i do this?
My first attempt (writing to my context.getCacheDir() based file path) appeared to work in the Gmail preview (no image preview, but attached file name and icon was visible), but the attachmen...
What is the best way to handle style that that is user-customized? Just as an example of the result I'm looking for, this would suffice:
body {
color: {{ user.profile.text_color }};
}
However, serving CSS as a view seems like it would cause a significant amount of overhead in a file that is constantly requested, so this is probably...
I am trying to give names to my dynamically generated checkboxes through a for loop an algorithm. Coming up with the algorithm was pretty simple but I am unable to give them name/checkbox text. The best I could come up with was a similar checkbox text for everything that was generated. Is there a way to name them?
Below is the code I ca...
Is there a simple way to identify Reflection.Emit-generated assemblies? When processing all assemblies loaded into an application domain, Assembly instances of dynamically generated assemblies don't behave the same as for standard assemblies. For example, accessing the CodeBase property leads to an exception:
string codeBase;
try
{
...
I created a method and pass the element type, id, and any inner text that instantiates a new html element. The last statement: Me.Controls.Add(element) adds it to the end of the page, but I would like it to be inserted in a specific position (between 2 divs within a form). What I am describing is very similar to this post on SO here, alt...
Lets assume there are list of users and under them there are several attributes. The users appear in checkboxlist. When a button is clicked it retrieves the attributes of the selected users and show them in other checkboxlists. Now when the attributes are selected and another button is pressed the selected attributes will be saved. My pr...