Showing posts with label click. Show all posts
Showing posts with label click. Show all posts

Thursday, March 29, 2012

Please click the back button on your browser and

Hi All,

In my one project, at many aspx pages I am getting below error.
Could anyone please give me solution of this.
================
Please click the back button on your browser and try again.Session state is
not available in this context.
================
I really tried to solve this a lot but could not get the solution.

Thanking you in advance,
RahulSeems sessions are disabled for your application and being used everywhere
inside applications...

Sudhakar Sadasivuni
http://weblogs.asp.net/ssadasivuni
MyUG : http://www.mugh.net

"Rahul Borade" wrote:

> Hi All,
> In my one project, at many aspx pages I am getting below error.
> Could anyone please give me solution of this.
> ================
> Please click the back button on your browser and try again.Session state is
> not available in this context.
> ================
> I really tried to solve this a lot but could not get the solution.
> Thanking you in advance,
> Rahul
>
Hi,

Thanks for your immediate reply!

But, if I check session on other aspx pages, the session
state is perfectly available.

What could be any other possiblity for this ... can you
please tell me ...

>--Original Message--
>Seems sessions are disabled for your application and
being used everywhere
>inside applications...
>
>Sudhakar Sadasivuni
>http://weblogs.asp.net/ssadasivuni
>MyUG : http://www.mugh.net
>
>"Rahul Borade" wrote:
>> Hi All,
>>
>> In my one project, at many aspx pages I am getting
below error.
>> Could anyone please give me solution of this.
>> ================
>> Please click the back button on your browser and try
again.Session state is
>> not available in this context.
>> ================
>> I really tried to solve this a lot but could not get
the solution.
>>
>> Thanking you in advance,
>> Rahul
>>
>>
>>
>.

Please click the back button on your browser and

Hi All,
In my one project, at many aspx pages I am getting below error.
Could anyone please give me solution of this.
================
Please click the back button on your browser and try again.Session state is
not available in this context.
================
I really tried to solve this a lot but could not get the solution.
Thanking you in advance,
RahulSeems sessions are disabled for your application and being used everywhere
inside applications...
Sudhakar Sadasivuni
[url]http://weblogs.asp.net/sasivuni[/url]
MyUG : http://www.mugh.net
"Rahul Borade" wrote:

> Hi All,
> In my one project, at many aspx pages I am getting below error.
> Could anyone please give me solution of this.
> ================
> Please click the back button on your browser and try again.Session state i
s
> not available in this context.
> ================
> I really tried to solve this a lot but could not get the solution.
> Thanking you in advance,
> Rahul
>
>
Hi,
Thanks for your immediate reply!
But, if I check session on other aspx pages, the session
state is perfectly available.
What could be any other possiblity for this ... can you
please tell me ...

>--Original Message--
>Seems sessions are disabled for your application and
being used everywhere
>inside applications...
>
>Sudhakar Sadasivuni
>[url]http://weblogs.asp.net/sasivuni[/url]
>MyUG : http://www.mugh.net
>
>"Rahul Borade" wrote:
>
below error.
again.Session state is
the solution.
>.
>

Saturday, March 24, 2012

Please Help Datagrid Columns

I have a table called Computers with 8 colunms.

I have a select query that list out the Computer brand and the price.
what I want is that when I click on the computer brand then the respective information about this brand will be display in the same page or open a new page. I am using a datagrid, how do I make this work? or should I use other component like table.
Please helpIf you have unique Identifier for the Computerband table use it to create a hyperlink column in the datagrid. then pass the id as querystring. During the postback event read the Id get the details of the brand form from the id and then you can display that in formation in a panel below this grid.

Note;
1. AutoGenerateColumns property must be set to False
2. Manually Create DataGrid columns including the hyperlink column

Ex:


<asp:DataGrid id="dg1" AutoGenerateColumns="False" runat="server">
<asp:HyperLinkColumn Headertext="Brand Id" DataTextField="BrandId" DataNavigationUrlField="BrandId" DataNavigationUrlFormatString="ComputerBrands.aspx?brandId={0}" />
<asp:BoundColumn DataField="ComputerBrandName" HeaderText="Brand Name"/>
<!-- .... add other columns -->
</asp:DataGrid

Thanks
Thank you Jay.

I still have som problem, I create a procedure that reads
Create Proc GetComputerID

@.ComputerID int

as
Select Computer,Price,CPU from Computers
Where ComputerID = @.ComputerID

I do not know where to pass the parameter in the grid, and I could not type computerID={0}
vb.net would not even allow me to run the application
I removed the where claus from my statement. But when I click on the hyperlink, nothing happens.
Here is the ASP code:
<asp:HyperLinkColumn Text="Computer" Target="_self" DataNavigateUrlField="ComputerID" DataNavigateUrlFormatString="UsedComputer.aspx?ComputerId={0}"
DataTextField="Computer" HeaderText="Computer" NavigateUrl="Computer"></asp:HyperLinkColumn>
<asp:BoundColumn DataField="Price" HeaderText="Price"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="ComputerID" HeaderText="ComputerID"></asp:BoundColumn>
</Columns>

Wednesday, March 21, 2012

please Help me find out a way!

I want a client to enter a 'key' in a textbox and click a button. then the entered value will be used to search a table in the MS-SQL database. The corresponding value found from that table will be used to search a second table. Data found from the second table will be bounded to the datagrid control at the page where the client entered the 'key'. What will be the way to achieve this? What will be the SQL command??

I'm not sure if I'm able to describe the problem. I'm a new user of ASP.NET. So please help.

Ishtiaque.

A stored procedure like this will work:

CREATE PROCEDUREdbo.Example
@.key1varchar(255)
AS
DECLARE@.key2varchar(255)
SELECT@.key2 = key2columnFROMTable1WHEREkey1column = @.key1
--The select below will return your results so you can bind to your grid:
SELECT*FROMTable2WHEREkey2column = @.key2


Thank you Sharbel_.

I made a stored procedure as you suggested and used it by a 'drag and drop' method in my webform. But as I mentioned I am a novice user of ASP.NET, could not utilize the sqlConnection or sqlCommand that resulted of doing so. Would you please let me know how to do so?

Thanks in advance.


Hi,

using System.Data.SqlClient; at the top in the .cs file

Create the connection and the command objects in the page_load or in the button click as

SqlConnection sqlcn =new SqlConnection(connectionString);

sqlcn.Open();

//creating and initialising a command object

SqlCommand sqlcm =new SqlCommand();

sqlcm.Connection = sqlcn;

sqlcm.CommandType = CommandType.StoredProcedure;

sqlcm.CommandText = StoredProcedure name;

sqlcm.ExecuteNonQuery();

HTH.

Friday, March 16, 2012

please help me to solve my provblem..its very urgent

i have a button in my webform. whenever i click that button it should display the crystal report designer window so that the end user can design his own report...
i don't know how to display crystal report designer window at runtime in asp.net.please help me...

please please help me...its very very urgent

Hello Niranjana,

A CrystalReportViewer needs a CrystalReportSource in order to function. So, in the scenario you outlined above, you'd need to dynamically add both to the page. In VB.NET, this would look something like the following:

 Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim crs As New CrystalDecisions.Web.CrystalReportSource crs.ID = "CrystalReportSource1" crs.Report.FileName = "CrystalReport1.rpt" form1.Controls.Add(crs) Dim crv As New CrystalDecisions.Web.CrystalReportViewer crv.Height = New Unit("200px") crv.Width = New Unit("200px") crv.AutoDataBind = True crv.ReportSourceID = "CrystalReportSource1" form1.Controls.Add(crv) End Sub

HTH,
Clay


sir,

thank you so much for ur information.

but my problem is different. I need to design the crystal report at runtime... ie one end user be able to design his crystal report.. ie adding fields ,formatting crystal reports all those things...

if u have any idea please help me sir

thanks & regards

nisha


Hi nish,

I dont whether its possible to enable the users to design his own reports... But try the below logic...

1. You need to list all of the fileds available in the reports...

2. Create the query which fetches the data from the table for the fields selected by the user and empty for unselected fileds. (initially you need to design the reports with all the fields)

3. suppress the fields in crystal reports if the field value is empty.

I hope the above will help you...


that i can do sir,i have already listed all the fields of a table in a listbox and use that to create crystal report...

my problem is really different...the end user should able to design his own crystal reports.

at runtime the designer should come. can we use any Report Designer Component(RDC) in asp.net...i am not getting an exact idea from net also. if u can please help me sir...


Hi nish,

Sorry I dont know whether its possible or not... I think its not available in Crystal reports... but may be in some other third party report tools...


anyway..thank you sir..

please help me!

hi all,
i wanna create a page which has two parts.
in the first part,i have header and menus and logo...
when i click on any thing in the firs part it shows the result
in the second part without any refresh in page.
could you please help me?
i would be apprecited any suggestion.

thanks


Even if you did do something like have panels and just toggled the visibility, it would still refresh the page because of postback

So I'm not sure if theres any method to change whats being displayed on an ASP.NET page without refresh from a postback.


Hi,
It seems you'll need to do all that in JavaScript, as there is presently no way to run .net languages on the client browser.
You could cheat a bit and put the right side content in an IFRAME sothat you could reload that one only. You'll need to get your handsdirty with even more javascript for this one, however.
John

two words. Java Script.

You can create <div></div> regions and set the display value to none or block. here is a start for you. you will have to create a button to fire the javascipt.

<script language="javascript">

function showView(divID){

document.getElementById('span1').style.dispaly = 'none';

document.getElementById('span2').style.display = 'none';

document.getElementById(divID).style.display = 'block';

}

<html>

<div id="span1" style="DISPLAY: none">Hello</div>

<div id="span2" style="DISPLAY: block">Good Bye</div>


You could also use IFRAMEs. When the user clicks on the selectedoption, it loads the selected page in the IFRAME. All you have to do isadd a target="<iframeName>" attribute to the anchor. Thecontainer page never needs to refresh.
Also,Javascript is one word.
Regards,
Sam

I stand corrected.

Hi All,
thanks for your suggestions,really i didn't know how to start?Wink [;)]
all of your solutions were useful and i used themGeeked [8-|]
AGAIN MANY MANY THANKS GUYSSmile [:)]

Please help setting target for frameset

I have a web application and a frameset. The fameset have left and righ
frame. What I want to archieve is that when I click on a button on th
left frame I want the link that is placed on the button to be displaye
on the right frame.
on the button i have this code:

Response.Redirect("http://localhost/ValutaKalVer2/Valutakurs.aspx").whe
I clicked on this button this page only show on the same frame. This i
where I am having problem, can somebody put me through setting th
target
Thanks in advanc

Justne
----------------------
Posted via http://www.mcse.m
----------------------
View this thread: http://www.mcse.ms/message400190.htmJustnew <Justnew.11rpqs@.mail.mcse.ms> wrote in
news:Justnew.11rpqs@.mail.mcse.ms:
> Response.Redirect("http://localhost/ValutaKalVer2/Valutakurs.aspx").when
> I clicked on this button this page only show on the same frame. This is
> where I am having problem, can somebody put me through setting the

You cannot set the target from the server side. You have to set the target in
the HTML on the first render.

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
Thank you for the reply: You said I have to place the target on th
html. Ok this is my image button <asp:imagebutton id="ImageButton1
style="Z-INDEX: 101; LEFT: 184px; POSITION: absolute; TOP: 104px"> I a
not quite sure where to place the syntax for target. Based on th
information so far can you tell me how to do that
Thanks for the answer so far
Chad Z. Hower aka Kudzu wrote:
> *Justnew <Justnew.11rpqs@.mail.mcse.ms> wrote in
> news:Justnew.11rpqs@.mail.mcse.ms:
> Response.Redirect("http://localhost/ValutaKalVer2/Valutakurs.aspx").when
> > I clicked on this button this page only show on the same frame
> This is
> > where I am having problem, can somebody put me through setting the
> You cannot set the target from the server side. You have to set th
> target in
> the HTML on the first render.
>
> --
> Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
> "Programming is an art form that fights back"

Justne
----------------------
Posted via http://www.mcse.m
----------------------
View this thread: http://www.mcse.ms/message400190.htm
Justnew <Justnew.11s96u@.mail.mcse.ms> wrote in
news:Justnew.11s96u@.mail.mcse.ms:
> Thank you for the reply: You said I have to place the target on the
> html. Ok this is my image button <asp:imagebutton id="ImageButton1"
> style="Z-INDEX: 101; LEFT: 184px; POSITION: absolute; TOP: 104px"> I am
> not quite sure where to place the syntax for target. Based on the
> information so far can you tell me how to do that

Check the HTML ref, but IIRC its just target="name" for the frame. I know
this is for separate Windows - I cannot remember offhand if frames use Target
too or if there is a separate key word. Its been a long time since I needed
frames since I use partial updates instead because they are more flexible.

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"