|
How you are binding your gridview?Whats the DataSource?
|
|
|
|
|
HI,this is my idea:
1、you can add a table with runing at service in UI
2、create table tb=new row()
3、crate cell c = new cell()
4、ch = new chkbox()
5、c.add.control(ch)
6、tb.add(c)
7、tablName.add(tb)
you can add dynamic table cell
so...i don't know than can help you .
|
|
|
|
|
I'm using a query string in asp.net2.0 web application.I encrypt a string value and after encryption it becomes M8BIJqI+Sdc= and I send the value using query string.When I receive the value in another page using Request.Querystring method it comes as M8BIJqI Sdc=.The + symbol becomes a space .So I'm getting error during decryption. Anyone explain such behavior !!!!
|
|
|
|
|
There are some characters that cannot be passed over querystring.For that you need to do URL endcoding as, for encoding Server.UrlEncode and decoding as Server.UrlDecode .
For details Have alook
|
|
|
|
|
|
your welcome
|
|
|
|
|
|
Hi,
Use Server.UrlEncode/ Server.UrlDecode to fix the issue,please check the following example:
string MyURL;
MyURL = "http://www.contoso.com/articles.aspx?title=" + Server.UrlEncode("ASP.NET Examples");
Response.Write("<a href=" + MyURL + "> ASP.NET Examples </a>");
string DecodedString = Server.UrlDecode(EncodedString);
Regards,
Jamil
|
|
|
|
|
Hi;
how to import data from a different table of SQLServer 2008 database to excel without using the gridview .
ThAnks
|
|
|
|
|
Only one posting is necessary. Please delete the other before someone responds to it.
You don't need to use a GridView at all. You can create a DataTable and then export it to an Excel file.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I am using .Net framework 3.5, ASP.Net, C#, and VS2008.
I have a C# class defined in dynamic compilation code (i.e. in a .cs file in the App_Code folder). I am using a namespace in the C# code, i.e. "namespace AltaNove". I can use classes in this namespace in databound controls on an aspx page just fine. The problem is that when I try to access the namespace (i.e. "using AltaNove") in the code-behind file, it is not exposed. I get the infamous "The type or namespace name "AltaNove" could not be found (are you missing a using directive or an assembly reference?"
How can a namespace defined in dynamic code not be exposed in the .aspx.cs file, but it is exposed and referenced correctly in the associated .aspx file? My last resort is to do away with the dynamic compilation and create an assembly, but i would rather not go through the hassle of managing shared assemblies.
Thanks.
Adam
|
|
|
|
|
The assembly is created at runtime, hence the dynamic compilation, so it doesn't yet exist for a using statement to resolve.
Dynamic code generation does have some drawbacks besides this.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi, all,
I create a gridview as the following
<asp:gridview id="GridView1" runat="server" autogeneratecolumns="false" gridlines="Horizontal" border="1">
There are default two columns, I will add the columns dynamically according method types.
after data binding, I call GridView1.Attributes.Add("bordercolor", "#acc0e9"); to set gridview row border.
The strange thing is that only some of rows have border, others with default horizontal line, this makes the table looks very strange.
Does anybody has this issue before?
Thanks!
|
|
|
|
|
|
IE6 has been obsolete for many years and is known for unsupported implementations. I'd upgrade to a modern browser and test it there then worry if there is a problem.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Andraw111 wrote: I am using IE6.
Well, you certainly have our sympathy.
Not to worry, it's hardly a challenge
for a competent coder
|
|
|
|
|
You are using the hardest way to add styles to a GridView. There are properties on the gridview object like BorderColor that you can access directly without using the attributes collection. You can also use RowStyle, AlternatingRowStyle and sever other presentation properties to get the look you want.
|
|
|
|
|
T M Gray wrote: There are properties on the gridview object like BorderColor that you can access directly without using the attributes collection.
Here is the reason this is a very good suggestion,
few know the difference between html attributes
and html properties, so it is best to stick with
the html properties which are much more well
known.
|
|
|
|
|
Andraw111 wrote: I call GridView1.Attributes.Add("bordercolor", "#acc0e9"); to set gridview row border
Here you are adding the attribute bordercolor to the table element,
and assigning it a value.This does not set gridview row border only
table element bordercolor.
|
|
|
|
|
I have to delete a group from Active Directory. I have create and list users working correctly and have tried many different instances of deleting group, but none have worked. Here is my current c# code, where "path" is a string read from settings.xml successfully:
public StatusObject DeleteADGroup(string user_id, string groupName, string password, string domain){
StatusObject status = new StatusObject(ClassName);
sting domainAndUserName = domain + @"\" + user_id;
if(DoesGroupExist(groupName)){
try{
DirectoryEntry entry = new DirectoryEntry("LDAP://" + path, domainAndUserName, password);
DirectoryEntry group = entry.Children.Find("CN=" + groupName, "group");
entry.Children.Remove(group);
group.CommitChanges();
status.Successful = true;
catch(Exception ex) {
// log error handling
}
else{
status.Successful = false;
//false handling
}
return status;
}
Any suggestions or help would be greatly appreciated! I've been working on this for quite some time & cannot find the correct delete code to work. I was hoping another pair of eyes(or 20) could see what I am missing. Thank you!
Bonnie
|
|
|
|
|
Cursory read, looks like you're removing all members of the group, but not deleting the group?
|
|
|
|
|
the groupName is a child group of the main group "entry". I want to remove a "CN=" group from the "LDAP" group. That, I believe, is why I have not been successful so far. I have my add group complete & it is:
DirectoryEntry entry = new DirectoryEntry("LDAP://" + path , domainAndUserName, password);
DirectoryEntry group = entry.Children.Add("CN=" + groupName, "group");
group.Properties["sAMAccountName"].Value = groupName;
group.CommitChanges();
All variables are the same, so I can't figure out why it isn't working. Thank you for looking!
Bonnie
|
|
|
|
|
Hi all,
In Visual Studio 2008, every time I use the dropdowns to create a new subroutine in my codebehind, VS creates it as private. Which, of course, the page can't read. I've looked for how to change this to a default of protected, but just can find how to do it. Could someone clue me in as to where to make this setting change so that protected is the default?
Thanks!
Denise "Hypermommy" Duggan
|
|
|
|
|
Need to validate some textboxes on the web form after tab out of each textbox. can that be done with AJAX? how?
|
|
|
|
|
Have you read anything about AJAX yet? How about this[^]?
I know the language. I've read a book. - _Madmatt
|
|
|
|