|
try like this.
protected void Button1_Click(object sender, EventArgs e)
{
HtmlTable table = new HtmlTable();
HtmlTableRow tr;
HtmlTableCell td;
for(int i=0;i<10;i++)
{
tr = new HtmlTableRow();
tr.ID = "tr" + i.ToString();
string cbxID = string.Empty;
for (int cols = 0; cols < 2; cols++)
{
td = new HtmlTableCell();
if (cols == 0)
{
HtmlInputRadioButton radio = new HtmlInputRadioButton();
cbxID = "rdb" + i.ToString();
radio.ID = cbxID;
radio.Name = i.ToString();
radio.Value = "RadioButton" + i.ToString();
td.Controls.Add(radio);
tr.Controls.Add(td);
}
else
{
td.InnerText = "Row Number" + i.ToString();
td.Attributes.Add("onclick", string.Format("checkRadio('{0}');", cbxID));
td.Style.Add(HtmlTextWriterStyle.Cursor, "pointer");
tr.Controls.Add(td);
}
}
table.Controls.Add(tr);
}
Panel1.Controls.Add(table);
}
<div>
<asp:Button ID="Button1" runat="server" Text="create Table"
onclick="Button1_Click" />
<asp:Panel ID="Panel1" runat="server">
</asp:Panel>
<script language="javascript">
function checkRadio(cbx)
{
document.getElementById(cbx).checked = true;
}
</script>
</div>
[edit] add comments[/edit]
modified on Monday, August 16, 2010 6:46 AM
|
|
|
|
|
Yeah thanks alot man...it worked just fine..
THANKYOU
|
|
|
|
|
hi guys
one page of my site didn't load its element and show me nothing
where the heal are my elements?
i got html source in IE and saw a specific block of java code repeated 5 times
why?
modified on Monday, August 16, 2010 2:40 AM
|
|
|
|
|
Try debugging you may get something..
Also you have not provided enough information. Explain it bit more.
|
|
|
|
|
Hi All ,
I have one application which is listening other application . that code i had written in application_start for that i need to open my page atleast once but i have requirement that as soon as IIS start it should start lisnting no matter page opens onot can u guys give me idea.
thanks,
Amit
|
|
|
|
|
Amit Patel1985 wrote: but i have requirement that as soon as IIS start it should start lisnting no matter page opens onot can u guys give me idea
For that perpose, you will have write an windows service, that will check the IIS status after certain interval.You need to code your logic on this service..
|
|
|
|
|
can you give me some link to do this?
|
|
|
|
|
Find the link for how to create a simple windows service Simple Windows Service Sample
Here, In this as it written you can use a Timer and invoke your own function after a certain interval and check whether IIS started or not accordingly do the operation.
And how to check whether iis is running or not see the link below
Click Here
|
|
|
|
|
What DOes these Error say? :
Server Error in '/' Application.
The process cannot access the file 'XXXX' because it is being used by another process.
and
There is not enough space on the disk.
modified on Saturday, August 14, 2010 3:54 AM
|
|
|
|
|
Something else is using the file "XXXX", like it is open in a text editor or Visual Studio or something (check you don't have it open).
If you don't, something system process is running it.
There is not enough space on the disk is self-explanitory.
If you don't have the file open, you might also have a virus, it might be worth running an anti-virus scan.
ragnaroknrol The Internet is For Porn[^]
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
hi guys
i get a report from my control panel to show me my ftp size
it shows me 19 gb but i downloaded my every file in root and the result is 2gb
my site is parchamdar.com
help me
Please
|
|
|
|
|
I wouldn't be surprised if someone has compromised your account and uploaded pirated materials. I once saw a development SQL server start crashing because someone left anonymous FTP open for convenient backup and restore and pirates uploaded a ripped copy of the movie Titanic (in German) among other things, which filled the drive.
Without knowing what FTP client you used and how you used it there is no way to be sure that you actually downloaded everything. Pirates use lots of tricks like creating directories with names that start with the null character which prevents many FTP clients from seeing or downloading the files.
Of course none of this has anything to do with ASP.Net. It falls more under System Admin.
|
|
|
|
|
My Ftp software is cute ftp ver 8.3
and i use port 20
need any info?
|
|
|
|
|
I do not use Cute ftp so I don't know how well it handles oddly named files. I would suggest using command line FTP. That gives you more options in terms of how to display the contents of your folders. If you need help on how to use it, use the help command. Or simply ask your hosting provider why your dashboard shows a different usage than you would expect. That probably should have been your first step anyway.
|
|
|
|
|
|
Hello,
Does any one know what is Dependency Injection in .net and why we should use it?
thanks
|
|
|
|
|
It means you need to search Google
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hello every1, I went through some article and do realize the DI. the problem is during developing face with the following error.Could you please help me,guys?
it is my code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Ninject.Core;
using SportsStore;
using SportsStore.WebUI.Controllers;
using System.Web.Routing;
using Ninject.Modules;
using Ninject.Core.Modules;
namespace SportsStore.WebUI.Infrastructure
{
public class NinjectControllerFactory : DefaultControllerFactory
{
private IKernel Kernel = new StandardKernel(new SportsStoreServices());
protected override IController GetControllerInstance(RequestContext context,Type controllerType)
{
if (controllerType == null)
return null;
return (IController) kernel.Get(controllerType);
}
private class SportsStoreServices : NinjectModule
{
public override void Load()
{
}
}
}
}
Error occurs in this line:
private IKernel Kernel = new StandardKernel(new SportsStoreServices());
this is the error
<br />
The best overloaded method match for 'Ninject.Core.StandardKernel.StandardKernel<br />
(Ninject.Core.KernelOptions, params Ninject.Core.IModule[])' has some invalid arguments
|
|
|
|
|
It's rather blatantly obvious what the problem is, the error message spells it out. StandardKernal constructor takes two parameters in this case, the first of which is a KernalOptions object. And what are you trying to pass to this constructor?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
the problem is I don't know what I have to pass as second parameter.does anyone know?
|
|
|
|
|
Can someone tell me the difference between <%: and <%#. I'm guessing this is a new feature in .NET 4 (or MVC2?) but I can't google it because of the special characters.
I'm aware this is probably a very simple question but I can't work out how to search for the answer myself.
|
|
|
|
|
|
How to refresh the grid using jquery,
my jquery calling the server function on clicking the button.
on this event i want to refresh my grid also.
how can i refresh grid?
|
|
|
|
|
You Need to give more information.
From your question, what i think is : you can call your grid binding function in that server function which you are calling from your jquery.
|
|
|
|
|
Why do you want to use JQuery? It is much easier to just but the grid and the button in an UpdatePanel and be done with it.
|
|
|
|