|
Are you using IIS 6.0? If it is then create a new virtual directory with a separate application pool (not the default one). You can refer the following url:
http://aspalliance.com/1464_Deploying_ASPNET_Applications.all[^]
All the best and may your problem get solved soon.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
|
|
I have a user control with some textboxes and linkbuttons,
when I write some text in one of the textboxes and then hit the enter key, the page load event fires.
is it possible to cause one of the other page's events to fire?
|
|
|
|
|
Set defaultButton property of the form to the button that you want to use.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
hi benams,
What i have understood, the solution is "javascript" check for e.keycode (or e.which) and compare it with 13 the ascii value for enter key then u can call method __doPostBack("control_name","event_to_call") this will cause the postback to the spcified event in the code behind file. Check out if this helps
regards
|
|
|
|
|
I tryed __doPostBack("lnb","Click") and __doPostBack("lnb","OnClick"). Both of them cause postback, but non of them fires the Click event of the wanted contorl...
|
|
|
|
|
hey benams,
So according to ur present senario, i guess one of the following 2 will help
1. In case the control use server side event u wanna fire is an html control with runat="server" tag, in that case u need to use javascript in the following manner
<script language=javascript type=text/javascript>
function checkKey()
{
var key;
key = window.event.keyCode;
if(key==13)
{
var btn = document.getElementById("Control_ID");
if(btn!=null)
{
btn.focus();
btn.ServerClick();
}
}
}
</script>
2) In case the control is an asp control starting with asp: then in that case the earlier way i suggested is appropriate, further follow this link to clear ur doubts
Hope this helps, and if not feel free to query again
Till then happy coding 
|
|
|
|
|
I have a web user control with some linkbuttons. I add it dinamically to an aspnet page a few times in the pageload event.
When I click on one of the linkbutttons at first time, the onclick event doesnt fire(only pageload fires), but at the other times I do it, the link button onclick event fires.
I want the event to fire at any click, anyone has an idea how can I fix it?
|
|
|
|
|
Hi,
Where did you set the attribute? You should set the attribute after adding the control. The controls should be rendered first and then attributes should be set.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
Hi,
what attribute do you mean? I put the onclick="lnb_Click" in the aspx page(where I declare the link button). I also tryed to put in Page_load, Page init and PreRender. Nothing of them works
|
|
|
|
|
Earlier you have mentioned that you have added it dynamically. Have you set the attributes to that link button on page load?
LinkButton1.Attributes.Add("onClick", "alert('hello');");
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
I don't add a link button dinamically, I add a web user control dinamically.
I set it to be:
lnb.Click += new EventHandler(func); (I want it to execute a server method)
* I do it in on the Page_Load of the user control(not of the aspx page)
maybe it's neccessary to access the link button from the page thar contains my user control?
|
|
|
|
|
-- =============================================
-- Author: anbu
-- Create date:
-- Description: sp to check login and to set theme
-- =============================================
CREATE PROCEDURE EscIndexLoginCheckTheme
@username varchar(500),
@password varchar(500)
AS
BEGIN
declare @IsAlreadyexist as int
declare @sessionvalue as int
if exists(Select empguid from empmaster where employeeid=@username and password=@password and status=0)
begin
select @IsAlreadyexist=0 -- Login Available
Select @sessionvalue= empmaster.EmpGUID,Themesetting.th_name from empmaster inner join EmpTheme on empmaster.EmpGUID = EmpTheme.EmpGUID inner join Themesetting on EmpTheme.themeid = Themesetting.themeid
where employeeid=@username and password=@password
end
else
Begin
select @IsAlreadyexist=1 -- Invalid Login
end
select @IsAlreadyexist as Result,@sessionvalue as id
END
i am getting the following error
"A SELECT statement that assigns a value to a variable must not be combined with data-retrieval operations."
|
|
|
|
|
Seems like a SQL question to me.... Did you google the error message ?
anbusenthil wrote: Select @sessionvalue= empmaster.EmpGUID,Themesetting.th_name from empmaster inner join EmpTheme on empmaster.EmpGUID = EmpTheme.EmpGUID inner join Themesetting on EmpTheme.themeid = Themesetting.themeid
where employeeid=@username and password=@password
Assuming the error means exactly what is says, in plain English, you can't selecet th_name into a table AND select EmpGUID into @sessionvalue at the same time. That's assuming the error message means exactly what it says.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
First of all this is ASP.NET Forum, there is separate Forum for SQL . So that would the proper place for ask this questions.
anbusenthil wrote: Select @sessionvalue= empmaster.EmpGUID,Themesetting.th_name from empmaster inner join EmpTheme on empmaster.EmpGUID = EmpTheme.EmpGUID inner join Themesetting on EmpTheme.themeid = Themesetting.themeid
where employeeid=@username and password=@password
Did you validate the statement?
|
|
|
|
|
pls correct t stored proc and send me back
tanx
|
|
|
|
|
anbusenthil wrote: pls correct t stored proc and send me back
We are here to give you the solution not to do the job for you. All of us has pointed out the error in the SP, now its your job to correct it.
|
|
|
|
|
If you can't fix it based on what we've told you, then you should talk to your teacher for help. I assume you're not working on commercial code, if you were, you'd be a thief, obviously.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
|
It's a database question which needs to be moved to General Database Section.
It seems that following line is creating problem for you:
Select @sessionvalue= empmaster.EmpGUID,Themesetting.th_name from empmaster inner join EmpTheme on empmaster.EmpGUID = EmpTheme.EmpGUID inner join Themesetting on EmpTheme.themeid = Themesetting.themeid
where employeeid=@username and password=@password
To get rid of this error, make sure that all columns are assigned to a local variable. For example, just create another variable and store th_name column into this. Your problem will be vanished.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
When I move a data directory containing few media files the session gets expiered. Can anybody help me out in find what is going wrong in the process of moving the directory.
Thanks in advance.
Sekhar
|
|
|
|
|
What is your session mode and Session expire time ? And How long time is taking to moving the directory ?
|
|
|
|
|
My session mode is 'InProc' and expiry timeout is '90' minutes. And it takes maximum 30 seconds to move the directory. Please Help.
Thanks.
Sekhar
|
|
|
|
|
hello
I am sending Mail using smtpclinet.send Method()
all work fine
but Issue is that when i send Mail it All time return True no Error if Undelivar Mail due to any reason like mailbox full,Wrong Mail Address etc.
so How can we notify that mail is undeliver due to Wrong any reason and Send Mail to Administrator that that mail is undeliver
I aslo Tried using
client.SendCompleted += new SendCompletedEventHandler(client_SendCompleted);
client.SendAsync(message, userMessage);
But That time it's give error Like mail sending Fail if E-Mail address is True
Please Provide Solution ASAP
Regards
Kirti Darji
kirti
|
|
|
|