asp.net WebControl is a control hosted on a webpage or in a UserControl. It consists of one or more classes, working in tandem, and is hosted on an aspx page or in a UserControl. WebControls don't have a UI "page" and must render their content directly. They can be reused in other applications by referencing their DLLs.
Questions tagged [asp.net-webcontrol]
78 questions
0
votes
1 answer
asp.net 3.5 settings styles on controls in a custom webcontrol
I'm having problem with adding style attributes to the control in my custom web control.
Below is a very simple custom web control just to illustrate the problem:
[ParseChildren(true)]
[ToolboxData("<{0}:SomeControl…

Pelle
- 2,755
- 7
- 42
- 49
0
votes
2 answers
Submit doesn't fire in custom WebControl (Server Control)
The submit button I create doesn't fire, not even if i set a breakpoint in Visual Studio trying to debug it.
public class CustomControl : WebControl
{
protected override void Render(HtmlTextWriter writer)
{
// Submit
var…

Eric Herlitz
- 25,354
- 27
- 113
- 157
0
votes
1 answer
IEWC Treeview refreshing to top of page on click
I am using an IEWC webcontrol in ASPX/C# page and whenever a treeview element is clicked, it will refresh to the top of the page. Is there any way to stop this?
It now works fine in IE with the addition of Autopostback and Viewstate set to True.…

JustAnotherDeveloper
- 3,167
- 11
- 37
- 68
0
votes
0 answers
How can I stop the ViewState from being cleared when adding a cookie?
I'm working in .Net Framework 4.8 for work. We have a cookie banner in an ascx file that appears throughout our site.
I've tried adding the cookie two ways:
with JS
function setCookie() {
var date = new Date();
var expiration;
var…

Stephina Pascho
- 75
- 2
- 9
0
votes
1 answer
Event handler not initialize on initialization
I have an aspx page and a code behind. The content of the page is dynamically created via XML and XSLT tContent.Controls.Add(master.ParseControl(ApplyXslt(xml, xsl_trans, xsl_args)));. Where tcontrol is the control

Jack Thor
- 1,554
- 4
- 24
- 53
0
votes
0 answers
Is it possible to pass any object as a parameter to LinkButton.CommandArgument using markup?
There is information on MSDN which says that CommandEventArgs.CommandArgument returns object which could be casted to particular type. There is example there. So is it possible to pass View for example?
The example on MSDN has string as parameter.…
user12998935
0
votes
0 answers
Generate code file from data table adapter
I'm working on an older web site application in C#, ASP.NET, which is now running on 4.7.2
The WebControlling.xsd contains the definitions, constraints and operations on the dataset with tables and table adapters.
For all the older tables there is a…

Peter
- 1,844
- 2
- 31
- 55
0
votes
3 answers
How to Update the Value of an ASP.NET Textbox Control on a Click Event
I have three asp.net textbox and button on my asp.net webform
namely textbox1, textbox2, textbox3, button1
i want if integer value of textbox2 will be substracted from textbox1 then result will be displayed in textbox3 and textbox1 and textbox2…

pooja
- 41
- 1
- 5
0
votes
1 answer
Something like ExtAspNet controls
Recently I discovered ExtAspNet Controls and I am so cheerful with it.
Only disadvantage for me is that no documentation and mostly support and descriptions are written on Chinese language. Before I go on and dig it into my projects Ill love to…

adopilot
- 4,340
- 12
- 65
- 92
0
votes
1 answer
repeater conditional view with no data logic
on my repeater i builed a table and want to show a colum just for user that is in role admin.
i need to remove the column in the HeaderTemplate and in ItemTemplate.
i could use data logic and add a db column that will be boolean, but then i need to…

eyalb
- 2,994
- 9
- 43
- 64
0
votes
0 answers
Custom control using panels not working
I'm trying to recreate what the ASP.NET Wizard control does using a custom control. I can't use the wizard control because that reloads the page and wraps the HTML in table.
Control Criteria:
- Async Reload
- Ability to change step from control ID…

Riddell
- 1,429
- 11
- 22
0
votes
0 answers
Which ASP.NET control to choose
I am making a web app in which I would like to create my own control. According to [tutorialspoint] there are 5 different types of ASP.NET web controls and I can't decide which to choose.
The control will be responsible for displaying an image…

YogoWafel
- 101
- 2
- 9
0
votes
1 answer
Why RadioButton/CheckboxButton don't have a VALUE attribute?
Why RadioButton/CheckboxButton don't have a VALUE attribute ?
The HTML input radio have a VALUE attribute, why the RadioButton/CheckboxButton don't? That's a real error Microsoft! Why that?
Now, imagine a situation:
You need a list of cars from…

Acaz Souza
- 8,311
- 11
- 54
- 97
0
votes
1 answer
adding imageurl to image element dynamically wont work
so iam trying to add a image i have saved on my project in image folder. But it dosent work
DirectCast(Customer.Items(0).FindControl("imageControl"), Image).ImageUrl = "~/images/IMG_1287.JPG"
DirectCast(Customer.Items(0).FindControl("imageControl"),…

Robel Haile
- 309
- 1
- 5
- 18
0
votes
2 answers
Display / Hide Advert Based on Role
I created a Web Control which is basically a div for holding a mobile banner but I wish to hide it if the user is an Admin
I have tried:
html
css
asp.net
vb.net
asp.net-webcontrol

Unknown User
- 49
- 9