|
Hi
I have recently added an update panel to my page.
All the code that I did have on my page load is now in my button which is the trigger for the update panel.
The problem is, on page load it still runs the query
How can I fix this?
|
|
|
|
|
OK now I have a different problem
Basically I have the query in my button event.
This query can select all fields but can also be narrowed down by search criteria
I store the sessions for the search criteria in the button event.
If I type in some search criteria and click search the first time it brings up all results not using the search criteria but the 2nd time it brings up the correct results accoridng to my search criteria.
Why do I need to click the button twice?
thanks!
|
|
|
|
|
May be you are setting the search criteria at button click event,
Can you show some code?
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
I've fixed it now.
Basically I was checking the lenght of a string before I ran the query but the string was set on the page load therefore it took two click to get to it.
Thanks anyway
|
|
|
|
|
Hi guys i am facing problem in nested cursor...,
In this first cursor for managers and second one is for employee details...,
Its going on well..,
But the employee detail it binding the all the managers, last record of employee at 2 times...,
but i want to bind those also at one time...,
See i given my procedure on down side:
pLz tell me what wrong in that?,
DECLARE curMgr CURSOR FOR
SELECT distinct ManagerID FROM @tbl_TempManagers
OPEN curMgr
FETCH NEXT FROM curMgr INTO @mgID
Insert Into @tbl_TempEmployee Select MId,ID,UserName,EId from tbl_login Where Mid=@mgid
WHILE (@@FETCH_STATUS = 0 )
BEGIN
SET @EmpDetail = ''
SELECT @Count=Count(*) FROM @tbl_TempEmployee
--
SET @Counter=1
DECLARE curDetailList CURSOR FOR
SELECT distinct EmployeeName from @tbl_Tempemployee where ManagerId = @mgID
OPEN curDetailList
FETCH NEXT FROM curDetailList INTO @EmployeeName1
SELECT
convert(varchar(20),TSDate,101) as [Date],TSSubject as [Subject],TSDescription as [Description],
TSHour as [Hour],TSMin as [Minute],convert(varchar(20),CreationDate,101) as [Creation Date],
CreationBy as [Name Of Employee] FROM tbl_TSEnterData where CreationBy=@employeename1
AND TSDate BETWEEN
CONVERT( NVARCHAR, DATEADD(wk, -1, @d) , 101) AND CONVERT( NVARCHAR, DATEADD(dd, -1, @d) , 101)
order by CreationBy asc,TSDate Desc
WHILE (@@FETCH_STATUS = 0 AND @Counter<@Count)
BEGIN
SET @EmpDetail = @EmpDetail + @EmployeeName1 + ', '
FETCH NEXT FROM curDetailList INTO @EmployeeName1
SELECT
convert(varchar(20),TSDate,101) as [Date],TSSubject as [Subject],TSDescription as [Description],
TSHour as [Hour],TSMin as [Minute],convert(varchar(20),CreationDate,101) as [Creation Date],
CreationBy as [Name Of Employee] FROM tbl_TSEnterData where CreationBy=@employeename1
AND TSDate BETWEEN
CONVERT( NVARCHAR, DATEADD(wk, -1, @d) , 101) AND CONVERT( NVARCHAR, DATEADD(dd, -1, @d) , 101)
order by CreationBy asc,TSDate Desc
SET @counter=@counter+1
END
CLOSE curDetailList
DEALLOCATE curDetailList
INSERT INTO @Result VALUES (@mgID, @EmpDetail)
FETCH NEXT FROM curmgr INTO @mgID
Insert Into @tbl_TempEmployee Select MId,ID,UserName,EId from tbl_login Where Mid=@mgid
END
CLOSE curmgr
DEALLOCATE curmgr
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
This is Asp.NET Forum. Please Put it on SQL Forum to get right answer.
cheers,
Abhijit
|
|
|
|
|
Post your questions in the correct forum.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Hi to everyone,
I'm trying to write a code for a webcam that is able to take picture from the web-site, web based. Meaning the person open the web site and it can use the webcam on it's own PC to take a photo of him/her-self. I'm using both asp.net and VB to do this. The area i'm stuck in is the getting to use the webcam in web-base. How can i go around doing this?
Thanks in advance
Max
|
|
|
|
|
max_sp07 wrote: I'm trying to write a code for a webcam that is able to take picture from the web-site
You are totally lost. Web application can't interact with web cam and take photos.
|
|
|
|
|
Accessing the webcam means accessin the computer resources which is impossible through ASP.net
You need to create an ActiveX control (preferably built on VB6) in order to capture the photos
Best Regards
3ala2
|
|
|
|
|
just3ala2 wrote: Accessing the webcam means accessin the computer resources which is impossible through ASP.net
You need to create an ActiveX control (preferably built on VB6) in order to capture the photos
Hi to 3ala2,
Can u help me by providing the code for it. Really don't know how to do it. Or do u have any reference for it, so i can study on it.
Million of Thanks.
Max
|
|
|
|
|
Hi all,
I am adding 3 session variables in login page. These session variables are added when user logins into website.
All these session variables i am using almost in all the pages to retrive the information from database based on the session variables.
And also i am using these session variables in master page.
I set session timeout to 60 min in web.config.
The problem is when ever i submit data of page to server , the old session variables are lost. The new session is started.
But i have to keep old session variable until user logouts from the website...
Please help me.. How to do that...
Thanks in advance.
|
|
|
|
|
It would be good if you can post some code.
|
|
|
|
|
Did you clear the session any where?
are you using Global.asx file ?
cheers,
Abhijit
|
|
|
|
|
Hi Abhijit Jana,
Thnks for your reply.
I have not cleared my session any where.
and i am not using any Global.asax file.
cheers,
sekhar
|
|
|
|
|
can you put the code over here ?
cheers,
Abhijit
|
|
|
|
|
Page 1:
=======
Pageload Event(...)
{
If(!Page.IsPostBack)
{
if(Session["id"]!=null)
{ // Getting details from data base based on session
//and loading into gridview
}
}
}
Button1_Click(..)
{ Response.Redirect("Page2.aspx",false); }
==============================================
Page 2:
=======
PageLoad Event(...)
{
If(!Page.IsPostBack)
{
if(Session["id"]!=null)
{ // Getting details from data base based on session
//and loading into gridview
}
}
}
Button_Submit_Click(...)
{
//Getting the datails of TextBox Controls
//Loading into appropriate columns of table in database
// Saving it into Database table
}
-------------------->Here is yhe problem after this event completes the old sessions were ended. New Session is started(When i trace this application i observed that)
link_btn_Back_Click(...)
{
Response.Redirect("Page1.aspx",false);
}
......................................
when i click back button, the page is redirected to Page1.
but in Page load event of Page1 ..i am loading details into gridview based on Session["id"].
But nothing is loaded into Gridview ..bcz of old sessions were Ednded.
This is my snippet, i hope you understand.
Cheers,
sekhar
|
|
|
|
|
Hi all,
I have to display all types of images including flash imges to user.
I could able to display images of all formats except .swf(flash) files
in Image Control of asp.net.
For Displaying .swf(flash)images i used FlashConrol(from FlashControl.dll).
This control is only displayinf images of type .swf, but i want to display all types of images under single control(asp.net control / third party control).
Is it possible ?
If yes!, How?
Please help me.
Thanks in advance.
|
|
|
|
|
Have you tried using a literal to display the images?
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
Hi,
Thanks for your reply.
Using a literal ? Do you mean Literal control ?
If that, how can we display images in literal control..
Cheers,
sekhar
|
|
|
|
|
Yup, a literal control. Here's an example:
literal.Text = "<img src=\"picture.jpg "\" />";
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
Hi,
Thanks for your reply,
But i have to assign the path at runtime. and there is a Previous & Next buttons in my page .
i have to show the next image when user clicks on Next, previous image when user clicks on Previous buttons.
I am storing image in diffrent folders, the path is stored in database table.
So how can i use this literal control. Is literal control displays Flash images(.swf files).
Please help me...
Cheers,
sekhar
|
|
|
|
|
That shouldn't be a problem. Just edit the code where needs be to allow for this. So just put the code in event handlers of the next buttons and use a count to increment and decrement clicks on the buttons so the events are registered.
I'm not 100% sure if it displays flash images but it can be used as a container for the player you mentioned that you downloaded. I know it definately works for images and as a container for a mediaplayer to display videos.
Here's code for the video:
mplayer.Filename = "video.flv";
mplayer.autoStart = false;
ltlMplayer.Text = mplayer.getval();
Hope that helps you
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
Hi,
Thanks for your reply. I dont have any video files to display.
I have to display images of different formats including Flash images(.swf files).
In image control i could able to display all type of images except .swf(flash images).
Here is my problem. I want to display all in single asp.net control.
Cheers,
sekhar
|
|
|
|
|
I realise this but Flash works similarily to videos when being displayed so try the example i gave you and modify the code so it works for you otherwise i'm sorry i don't know what else to suggest
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|