all groups > asp.net webcontrols > december 2006
Filter by week: 1 2 3 4 5
Gridview delete
Posted by L-E Eriksson at 12/31/2006 12:28:18 AM
Hello!
I have a simple gridview. I am using stored procedures and a my own Data
Access Layer. Now I want to delete a row.
Gridview code:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns=false
AllowPaging="true" PageSize="5" DataKeyNames="KonsultID">
<Columns>
... more >>
Typing Markup Tags Ending in />
Posted by Nathan Sokalski at 12/30/2006 1:09:01 AM
I often use self-closing tags (such as <br/>) when creating an ASP.NET
application. However, when I enter them in Visual Studio .NET 2005, it
automatically inserts a space before the />. In most cases this does not
bother me, but for tags such as <br/> that I usually do not use any
attribute... more >>
What is syntax for Eval(User.IsInRole) to return True/False To Vis
Posted by Morris Neuman at 12/28/2006 4:48:00 PM
I am trying to set the Visible property attribute of a asp:HyperLink control
based on the user's membership role. If the user role is administrator then
I want to display the hyperlink, if not then I want the hyperlink to be
invisible.
I tried setting:
Visible="<%# Eval(Convert.ToString(U... more >>
how to use Click event with programmatically defined button?
Posted by Bob at 12/28/2006 4:26:15 PM
Hi,
I'm working with VWD and i defined programmatically a button (in
code-behind) with an ID. So I expect to see beside "Page Events" and "Form1"
my button "b1" in order to use the Click event. But it doesnt' appear. After
saving the code-behind file, i only see "Page Events" and "Form1".
... more >>
Create image web control adapter
Posted by hardieca NO[at]SPAM hotmail.com at 12/28/2006 9:12:55 AM
Hi,
I would like to create an adapter for the image web control to cure a
pet peeve of mine. Currently, if I write out:
<asp:Image ImageUrl="myPic.jpg" AlternateText="Some text"
runat="server" />
the html that is emitted is:
<img src="myPic.jpg" alt="Some text" style="border-width:0p... more >>
Newbie Question: How Does One Access an Individual Field in a Record?
Posted by Rick at 12/27/2006 11:10:22 AM
I can connect to a sql server database, I can query the database, and I can
display the results in a datalist, but how can I refer to an individual
field from a query? My query is from a sql command in a datasource.
For example: SELECT CUSTOMER FROM CUSTOMERS.
How do I use asp.net to refe... more >>
Regular Expression Validator question
Posted by curious at 12/24/2006 6:37:00 AM
I am using a RegularExpressionValidator to validate a TextBox. I use
"^[\+|-]?[0-9]+(\.[0-9]*)?$" to check for a real number. The control works
fine as long as the user enters something in the TextBox; it does not work if
the user leaves the TextBox blank. Is there a bug in the implementation ... more >>
How to change the font style and size on the entire Aspx page programatically
Posted by technoGirl at 12/23/2006 9:35:28 PM
hey guys, I know it's crazy how I'm working over xmas...but oh well
here I go:
In my ASP.Net app (1.1), I want the user to be able to select font
(such as Bold, Italic, underline) and stuff like that from a dropdown
list) and then I wanna apply these properties to all my page (all
text). Now ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Validation of RadioButtonList
Posted by cpnet at 12/22/2006 8:55:04 PM
I've added a RadioButtonList (with 2 choices, neither selected by default),
and a RequiredFieldValidator to a WebForm. Basically, I want a red asterisk
to appear beside the RadioButtonList until the user selects on of the
choices. I'd like this validation to fire on the client side. I've se... more >>
Ajax Triggers for DropDownList don't fire
Posted by Troy Donavan at 12/22/2006 1:28:00 AM
I'm trying to get a partial page (Ajax style) update when the selection of a
DropDownList changes. I'm not having much luck. I will continue plugging
away at the sample applications in hopes of finding some hints, but
meanwhile, if someone could point out to me what I am doing wrong, I would... more >>
Embeding html controls in Server Control
Posted by Raj Dhrolia at 12/22/2006 12:00:00 AM
Hi Everyone,
I have some HTML snippets (with about 15 HTML controls) that needs to be
embedded into my server control. I need these HTML controls on client side
for some processing (JS).
What is the best way to implement this?
One most straight forward way i can think of is to have some... more >>
Pass parameter from pages aspx
Posted by Gonzalo Moreno at 12/21/2006 12:00:00 AM
Hello I need pass one parameter from one treeview to other page with one
gridview, this parameter is the filter of the "select * from kk where
fields=parameter" .
How can I do this? any example similar?
Thanks
... more >>
GridView with changes transferred to db at end-of-edit
Posted by R.A.M. at 12/20/2006 10:43:59 PM
Hi,
I am learning ASP.NET and I need to have an Excel-like sheet of records from
database. Users may modify data in the sheet. I thought about using GridView
with DataSource but the problem is that the changes should be transferred to
database not when record is modified but when separate button... more >>
Validation in GridView
Posted by Gonzalo Moreno at 12/20/2006 2:25:28 PM
En blancoHello I need help, I don´t know how controller the validation of
one column of gridview, this column update correct except if the user put
"," or letters beacuse this fields is numeric, only accept for example "9.2"
but not "a.3" or "9,2" or "kk". The problem is that mensage of error ... more >>
accessing control in EditItemTemplate of DataList
Posted by R.A.M. at 12/19/2006 10:57:21 PM
Hello,
I am learning ASP.NET.
On .aspx page I have a data-list with text-box that I would like to read
during line modification.
<asp:DataList ...
OnEditCommand="Sample_Edit" >
...
<EditItemTemplate>
...
<asp:TextBox ID="SampleEdit" runat="server" />
... more >>
Using Web.config's <system.web><pages><controls><add /></controls></pages></system.web> To Register UserControls
Posted by Nathan Sokalski at 12/19/2006 9:02:20 PM
My Web.config file contains the following section to register some of my
UserControls:
<pages>
<controls>
<add tagPrefix="NATE" tagName="Banner" src="~/Banner.ascx"/>
<add tagPrefix="NATE" tagName="Navigation" src="~/Navigation.ascx"/>
</controls>
</pages>
However, I still r... more >>
Data grid column sizes
Posted by John Wright at 12/19/2006 4:09:37 PM
I have a datagridview bound to a data table. I want to force the columns to
all be the same size. How is this done with the grid?
John Wright
... more >>
How to position a dynamically created control...
Posted by EricW at 12/18/2006 11:46:55 PM
I want to create my homepage completely dynamically, but when I create two
imagecontrols and want to position them, they won't move at all.
I've read some artikels about using the placeholder, but when I dynamically
create one, I can't move it at all.
Or am I doing something wrong here?
... more >>
force viewstate to clear on OnCommand event
Posted by J055 at 12/18/2006 5:23:58 PM
Hi
I have a number of nested repeater and placeholder controls. When a
LinkButton is clicked I delete a db record. I'm relying on viewstate quite a
lot so when a linkbutton's OnCommand event is rasied I'd like to remove the
record from the viewstate so that the rest of the page controls loa... more >>
How to create Treeview in ASP.Net 1.1?
Posted by Murali at 12/16/2006 1:40:45 PM
Hii..
Iam developing a application in which i need an treeview control to navigate
my webpage
so how can i achieve this one.
(OR)
is there any tree view control for that??
can any tell about this......
regards
Murali.S
... more >>
Required multiple instances of a UserControl loaded at runtime
Posted by J055 at 12/15/2006 5:04:15 PM
Hi
I need to access multiple instances of the same UserControl dynamically. I
can successful do this with one control but I'm not sure how I can assign
multiple instances to a Repeater at runtime.
This is what I have so far
protected void Page_Init(object sender, EventArgs e)
{
//... more >>
How can I send shell-commands to the web-server in webcontrols?
Posted by Philipp Landolt at 12/15/2006 9:50:46 AM
Hello,
I'm developping a WebGUI where the user are able to create some
shell-commands and add them to a joblist.
'Adding them to a joblist' means that these commands are stored in a listbox
listbox_joblist then.
The joblist should be executed on the webserver then.
How can I send this jo... more >>
Keeping 2 user controls of the same class synced
Posted by yashgt NO[at]SPAM gmail.com at 12/14/2006 9:42:58 PM
On a page, I need to show one item at a time. The top of the page has a
Previous-Next control, followed by the item being shown, followed by
another Previous-Next control. I have created a P-N user control and
customized it to fire an event, OnChange, when a Previous or Next
button is clicked, w... more >>
ObjectDataSource TableAdapters Point-N-Click HELL
Posted by gabe at 12/14/2006 1:42:09 PM
Hi,
I'll try to be specific with the problems that I'm encountering using
the new asp.net 2.0 controls --- TableAdapters with Typed DataSets,
Object DataSource Controls and the Gridview.
Are people have success using these controls?
1) I'm hitting and Oracle database, and there seems to b... more >>
Return Values from Popup to UserControl
Posted by ruca at 12/14/2006 12:14:53 PM
Hi,
Can anyone tell me please how can I return values from a popup to a
UserControl. I use the same "method" like to return to a WebForm, but it not
works in UserControl case.
I have this code to return from popup to webform:
-------------------------------------------------------------... more >>
data field - change true/false to Yes/No
Posted by David Thielen at 12/13/2006 10:05:00 PM
Hi;
Inside a GridView (view only - no edit) I have a column where the property
is a boolean and I want to display Yes/No (localized language) - any
suggestions on the best way to do this.
AND... this is a class I don't control so I can't add a property -
System.Web.Security.Membership.
... more >>
Textbox Custom Attribute
Posted by Ryan at 12/13/2006 9:39:55 PM
Hello everyone,
I am brand new to writing custom controls and I thought I would start
with an easy one. Adding an attribute, OriginalValue, to a textbox.
I got this together, and while stepping through it, the property is
setting the viewstate properly with the given value, but on the
postb... more >>
asp.net 2.0 site menu control (from navigation block) and IE 5 compatibility
Posted by Dmitry Klymenko at 12/13/2006 2:09:37 PM
Hi, All
Was very suprised, that html rendered by standard control is not compatibile
with IE 5 (!) and latest mac/safari as well.
Skiping safari support is understandable, but why it does nto work for IE
5.0 is very confusing.
Does anyone redefines render for that control to extend it's com... more >>
can't remove listitem from ddl in loop
Posted by mharness at 12/12/2006 3:02:56 PM
Hello,
Any ideas why this code will not remove listitems for the dropdownlist?
Protected Sub CullProjects()
Dim ProjectName As String
If Me.gvRequestProjects.Rows.Count > 0 Then
For Each row As GridViewRow In Me.gvRequestProjects.Rows
ProjectName... more >>
Item has already been added. Key in dictionary
Posted by avital at 12/12/2006 5:58:42 AM
Hi,
When inserting a new item i get the following error: Item has already
been added. Key in dictionary: 'Cellular' Key being added: 'Cellular'
As far as I know you get that error if you enter the parameter more
than once, however i can't find anywhere in my code where the value is
entered m... more >>
Drop Down List issue
Posted by KT at 12/11/2006 6:30:32 PM
I have this code below on my aspx page but it doesn't load this into the
drop down list at runtime. The dropdown list poplulated from a SQL stored
procedure...but adding a value to the list like below should work.
<asp:DropDownList ID="ddlHospitals" AutoPostBack="true" runat="server">
... more >>
Themes & CSS
Posted by Geoff at 12/11/2006 4:05:01 PM
for my sins (in a .net 1.1 app) I have created several css files with the
same styles and then at runtime decided which css to use. For instance I have
a chat control that when in public mode uses one css and when in private mode
uses another. Now I could go through the private css and make su... more >>
Parameter as web user control
Posted by Fernando at 12/11/2006 1:47:24 PM
How can i bind a parameter from a sqldatasource to a web user control
property?
Tanks
... more >>
ERROR: The state information is invalid for this page and might be corrupted
Posted by Nathan Sokalski at 12/9/2006 5:42:38 PM
I am recieving the following error on the second postback of a page I have
written:
The state information is invalid for this page and might be corrupted
Stack Trace:
[FormatException: Invalid character in a Base-64 string.]
System.Convert.FromBase64String(String s) +0
System.We... more >>
Properties do not reliably persist using CompositeControl
Posted by Wayne Brantley at 12/7/2006 1:53:16 AM
Hi,
Create a simple composite control using ASP2.0 CompositeControl class.
Have two webcontrols exposed as properties, so they show as subproperties in
at designtime in the properties window.
Change any of the these webcontrol properties - switch to source view -
none of the properti... more >>
Enter text in at least one textbox
Posted by Tigers21 at 12/6/2006 9:16:56 PM
I want to check if at least one of my two textboxes has an entered value....
If none of them has a value, I want a validator to show an errormessage....
How do I do that?
... more >>
file upload and download
Posted by mann at 12/5/2006 10:29:13 PM
Hi,
I'm an new user of this group.
my problemm is...
I have to develop a utiliy to synchronize database .....sql server to
Access.......
user will dwonload file from net which data is in sqlserver....and
he/she will update his database which is in Access....at his desktop...
Please help... more >>
Print preview bug in IE7 with MS WebControls
Posted by alex at 12/5/2006 7:42:14 PM
When I print preview the sample HTML below in IE7 I get a blank 1st page and
nothing after page 2. If I shorten the content of the pageview so it fits
in less than a page, then print preview works. Do you see this bug as well?
Is there a work around you can think of? Thanks. Alex.
Samp... more >>
Any way to set attributes for server controls by referencing properties/methods/variables?
Posted by paul.hester NO[at]SPAM gmail.com at 12/5/2006 6:27:11 PM
Hi all,
I'm trying to find a declarative way to set server control attributes
using the attribute="<%= SomeValue %>" syntax.
This works fine for basic HTML controls, but server controls will
literally display the contained text, but won't execute the containing
code.
It works fine if I u... more >>
Render web custom control
Posted by Peter Kirk at 12/1/2006 6:29:00 PM
Hi, if I am writing a web custom control, do I override the Render method or
the RenderControl or the RenderContents method - and what is the difference?
Thanks,
Peter
... more >>
Dropdownlist selected value
Posted by KT at 12/1/2006 10:33:33 AM
I'm trying to simply get the selected value from a dropdownlist but it only
returns the first item regardless of what you select.
Dim SalutationSelected As Integer =
CInt(Me.ddlSalutationList.SelectedItem.Value)
Thanks
... more >>
Dropdown in webpart lost its state after postback
Posted by Alex at 12/1/2006 1:55:45 AM
Dear colleagues, I am trying to develop Sharepoint 2k3 webPart for
currency calculator. Since I want to achieve the
visibility/invisibility effect of certain rows, I realized that the
HTML table which consists of those rows should better be generated
during CreateChildControls() instead of tradi... more >>
|