|
You are welcome
|
|
|
|
|
did you check my recent article ?
|
|
|
|
|
Thanks for good effort
N a v a n e e t h wrote: If you could tell me why you need this, there may be better ways to do this.
Exactly, I want to bind business objects to TreeView which does not support this sort of binding. So, I created my own datasource which is supposed to support a variety of business objects
I got a safe solution
Instead of Generic or unknown datatype. I created an abstract class from which I inherited all other classes of which objects may be bound to my new datasource
It works well
N a v a n e e t h wrote: If you don't want designer support for this control you can use generic parameter with the class declaration. Then the code will be pretty nice.
Yes, I need a designer support
However, Thanks N a v a n e e t h for your great help.
You are one of the best of CP
foreach(Minute m in MyLife)
myExperience++;
|
|
|
|
|
Mohammed Gouda wrote: I created an abstract class from which I inherited all other classes of which objects may be bound to my new datasource
Good.
Is this abstract class has some default functionality ? or it is just acting as a base class ? If it is acting as a base class, you should consider moving to an interface.
Controls like GridView/Repeater supports data binding objects which has IEnumerable implemented. Your control also could do something similar.
Mohammed Gouda wrote: You are one of the best of CP
Thanks. I am delighted
|
|
|
|
|
N a v a n e e t h wrote: Controls like GridView/Repeater supports data binding objects which has IEnumerable implemented. Your control also could do something similar.
Yes, My class alreay implement IHierarchicalEnumerable cause I deal with TreeView control.
Thanks for the hint
foreach(Minute m in MyLife)
myExperience++;
|
|
|
|
|
Thanks to all participants
I got a safe solution
Instead of Generic or unknown datatype. I created an abstract class from which I inherited all other classes of which objects may be bound to my new datasource
It works well
foreach(Minute m in MyLife)
myExperience++;
|
|
|
|
|
Hi All,
I'm using Ajax UpdatePanel in my page. I have two div controls inside UP and want to resize the div as per the size of image/ASPTable. When I check the size of image/table, it shows 0.
modified on Sunday, August 24, 2008 7:15 AM
|
|
|
|
|
Can you provide the code'It'll be better to answer.
Cheers!!
Brij
|
|
|
|
|
hello
i can not convert
ReDim Preserve data(totalBytesRead + dataBlock)
to C#
|
|
|
|
|
Use the Array.Resize method.
Note that neither ReDim Preserve nor Array.Resize actually does resize the array. A new array is allocated, and the data is copied from the original array. If possible, you should allocate a sufficiently large array from the stast.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
hello
i used from Array.Resize,but i could not arrange its arguments
please help me that how can i arrange its arguments?
thanks
public byte[] ExtractBytesFromStream(Stream stream, int dataBlock)
{
int totalBytesRead = 0;
byte[] data;
try
{
while (true)
{
Array.Reverse(data, totalBytesRead, dataBlock);?
Array.Resize(data, totalBytesRead + dataBlock);?
int bytesRead = stream.Read(data, totalBytesRead, dataBlock);
if (bytesRead == 0)
{
break; // TODO: might not be correct. Was : Exit While
}
totalBytesRead += bytesRead;
}
Array.Reverse(data, -1, totalBytesRead);
return data;
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
return null;
}
}
|
|
|
|
|
First of all, you don't even have an array at all. You have to create an array before you can resize it.
Why are you reversing the data in the array? If there is a reason to revere any data in the array, you can't reverse data that isn't even in the array yet, and there is no reason to reverse a bunch of zeroes. Also, you can't use -1 as starting index when reversing a part of an array.
You have to resize the array to the size of the actual data read before you return the array. Now you are returning an array that is larger than the actual data read, and you don't return how much of the array that contains valid data.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
hi all,
i m working on the email validation i ve to check email id either it is correct or not but i cannt send mail on them. ie when i validate all email id client send newsletter and they should not bounce.
thanx in advance
|
|
|
|
|
You can use regular expressions to validate the supplied text is in a valid email format.
help as an alias wrote: when i validate all email id client send newsletter and they should not bounce.
You are expecting too much. You won't know the mail bounces untill you send it.
|
|
|
|
|
help as an alias wrote: either it is correct or not but i cannt send mail on them. ie when i validate all email id client send newsletter and they should not bounce.
You won't know until you actually try to send the email whether or not it bounces. You can use regular expressions to see if the email is in a valid form or not.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
thanx, i alrey use this but i can to check it correct email id i m also checking domain is correct or not but not able to find the solution for email
|
|
|
|
|
You don't find what you are asking for. Only way is to send email, get a confirmation by asking users to click on confirm email link.
|
|
|
|
|
I second that. Sure there's regular expressions to check for any silly email addresses, but one has to actually try and send an email to see if it is indeed valid or not. The confirmation approach works well, too
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Where there any ASP.NET changes from 2.0 to 3.0/3.5?
Or does 3.0/3.5 simply represent the newer .NET technologies - WPF/WCF/WF?
|
|
|
|
|
dont you think msdn would have been a better place to look for it.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
modified on Sunday, August 24, 2008 3:26 AM
|
|
|
|
|
I have a gridview that there is a button in every row of it.I store product in this gridview .I want to when a user click on a button , the id of that product store in a session,and in a popup window the user can see a message.and after that ,user can select a product again.in another page I want to get these Id and show that product that a user selected in a gridview.my question is that , can I store several id in a session?what code should I write? please help me .thanks
|
|
|
|
|
This is pretty straight forward task, and what have you done so far?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
How do I take the database Visual Studios .net creates for user logins and upload it to a server that will host my website? I’m a very, very new user. I have been learning ASP.net through books and websites. I found many place that teach me how to create the login. It runs fine on my computer but I can’t find any information about how to transfer it to a real website and link my code to that new database. Thanks to anyone that can help.
NewGuy
|
|
|
|
|
It'll be better if you make your own custome control then you would be having meore flexibility on that
Cheers!!
Brij
|
|
|
|
|
you need also the data base server for that. you just take a backup and restore the database on web database server from where your web server will connect with data base server.
|
|
|
|