|
I'm not sure if it helps, but try declare your control as
public class MyControl: System.Web.UI.UserControl, System.Web.UI.IPostBackEventHandler
{
public void RaisePostBackEvent(string str)
{
// can be empty
}
...
}
|
|
|
|
|
I tried it but it didn't work. I guess its for Rendered Custom Controls.
Regards,
Aleem
|
|
|
|
|
I figured that after I posted, because it would have generated an error. Well another think to look for: INamingContainer . Your control must implement this interface in order to be able to handle events.
I knew there was something because I also experienced some troubles with custom controls, but couldn't remember exactly what that was.
It has come to me though in the end
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
The INamingContainer interface must be implemented by the control because it creates unique IDs for the child controls. And you guessed right. Unique IDs are needed for the child controls to handle events
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
Thanks Mircea. It behaves normally now. Can you suggest a good book for these intricacies of ASP.NET.
Regards,
Aleem
|
|
|
|
|
I hear the best book available on ASP.NET is Professional ASP.NET[^]. I haven't read it yet, but it's on my TO DO list.
I haven't read any books on ASP.NET and my experience comes from working with it and from articles. There are a lot of them for each of these intricasies here on CodeProject or on the web. If you're facing problems just do a google search with what you're trying to acomplish or with what problems you meet. It's been successfull for me until now.
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
Professional ASP.NET is good but its quite limited, in the sense that I was unable to get this problem solved from there and alot others. I have it btw .... and you're right internet is the best resource. Its the most current and updated one as well. Anyways thanks again for your help.
Take Care
Regards,
Aleem
|
|
|
|
|
Glad to be of help. The main reason I want to read the book it's because I want to get the full picture of ASP.NET. Having not read any book on it, it's possible that I'm missing something important, that I haven't got the chance to work with.
Well best of luck and happy programming!
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
|
Hi,
I application for multipage perpose I am using Tabstrip Control..
when I run the application tabstrip controls working in Mozilla Browser
But that cannot working in I.E
Thr is any solution for this..
Thanking
Balu
|
|
|
|
|
I want make a list menu,inside that all title of menu must load from datatabase ,who can help me?
|
|
|
|
|
If you are using the ASP.NET 2.0, you might want to check out the Provider[^].
|
|
|
|
|
By using single table the question and answer should in tree format using asp.net ( example: same as message board)
prasanna
|
|
|
|
|
Homework help perchance?
I mean COME ON - at least try to disguse it
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
hi all,
i have to execute a query in page load event.
Like "select * from tbl where sName= ' " + WindowsUserName + " '"
here WindowsUserName is nothing but userName of the windows
system. I tried to use server side script to get username but their i am
getting system number rather than getting username.
But using client side scripting i am getting the windows
userName. i failed to use that username in the page load event .
my client side scipt is like this
sub fncI
dim X
set X = createobject("WSCRIPT.Network")
dim U
U=x.UserName
end sub
help me to use this user name in the page load event
thanx in advance.....
your
peter
|
|
|
|
|
If you dont want to use authentication, I have one idea how to use your clientside script, you should register it in (!IsPostBack) block in Page_Load as startup script, and this script should cause postback (domcument.form1.submit() in js, i think). Your script should save username into hidden field, you can read this value in Page_Load after first postback.
You cannot read this value when page is created (IsPostBack property is false), because client side script is called on client side after Page_Load and other methods are executed on server side.
Btw. can you post a code you use for 'getting system number' ? Maybe I can help you to get user name instead...
I hope it helps, if something is not clear, just ask...
Pilo
|
|
|
|
|
getting system number
System.Security.Principal.WindowsPrincipal p = System.Threading.Thread.CurrentPrincipal as System.Security.Principal.WindowsPrincipal;
string strName = p.Identity.Name;
Response.Write (User.Identity.Name.ToString());
WindowsIdentity user = WindowsIdentity.GetCurrent();
Response.Write(user.Name);
your
peter
|
|
|
|
|
Hi all,
i'm using a datagrid with a sqldatasource.in that i'm using where clause with 2 parameters student ID and name.but the select statement is not working when there is both ID and name is present.But its working and display the data with the ID only.Can any one give me the solutions for this?
Babu
|
|
|
|
|
What is the sql statement which you are using?
Best Regards,
Apurva Kaushal
|
|
|
|
|
select [StudentID],[Name],[Percentage] from tblstudent WHERE (StudentID = @StudentID AND Name=@Name AND Percentage=@Percentage)
this was the statement in the sqldatasource tool.
Babu
|
|
|
|
|
Hi,
Do you have any record in the database which is satisfying all the conditions here because your query is correct.
Best Regards,
Apurva Kaushal
|
|
|
|
|
hi,
i've applied this query for another table too.that is for customers.even for that it was not working.
can you give me the sql statement using OR Condition.will it work.
Actually in sqldatasource there is no need to write coding manually.just in configuration mode we can create with the option "Where" button.
Babu
|
|
|
|
|
Hi,
If you are using and condition then all the conditions has to be satisfied then only you will be able to get the result. So according to your query is you are having a record which is having all the StudentID, Name and Percentage which you have passed that will be fetched.
For OR condition just replace and with or.
Hope this will help you.
Best Regards,
Apurva Kaushal
|
|
|
|
|
SELECT [CustCode], [Name], [Addr], [OrdType], [Area], [Lob] FROM [Customer] WHERE (([CustCode] = @CustCode) OR ([Country] = @Country))
i was using dis query for another table access.but its not working.
Babu
|
|
|
|
|
are you getting any error or simply not getting the result. In case of of the second just check whether you are having the required records in the table.
Best Regards,
Apurva Kaushal
|
|
|
|