|
Paddy Boyd wrote: Do you add the controls to the viewstate? An object must be serializable to be saved in viewstate.
That makes sense. I've altered my Load and Save Viewstate methods and it works now. I was just dumping the items directly into the viewstate. I though it would automatically call Load/SaveViewstate as needed.
Thanks. I've got this working now.
|
|
|
|
|
I have a grid view with some links to take you
to details of the item in the grid. On the details page is
a link to go back to the page containing the grid.
I want this link to return people to the same position
on the page like the back button does.
I can't use "javascript:history.back()" because if they sort items
on the details page it will no longer take them back to the grid but just 'unsort'
the current page.
I have anchors on the page which kind of work.
But they will always put the grid item at the top of the page,
And if they clciked it at the bottom it will be quite a different position.
Any ideas anyone?
Sorry this is a bit long.
|
|
|
|
|
What you can do is pass the id of a control to your page in the querystring, or store as a session item or cookie or however you chose. Then in the codebehind on page load set focus to that control.
|
|
|
|
|
|
Hello All,
I am using .NET v1.1 with SQL Server 2005. I have cofigured the application for SQL Server Session state management. However i am not able to pass the session variable between 2 domains.
I went through 'ASPStateTempSessions' table from tempdb and found the 'SessionItemLong' column to be NULL. I am storing int type data in session so all my values go into 'SessionItemShort' column. I found the 'TempGetStateItem' procedure gets the session value from 'SessionItemLong' column.
Can anybody suggest me a resolution to this issue?
Thank you,
Abhijit
|
|
|
|
|
Yeah, store the session information in the database with your own code. You can create a table with fields and store each item seperately or you can store all the information as xml in one field. That should be easy enough.
|
|
|
|
|
i need to know about how to use cssclass of web controls
|
|
|
|
|
in html head part
use this line of code
<link rel="stylesheet" href="../App_Themes/Theme1/Format.css"(css path and name) type="text/css" />
anujsharma
|
|
|
|
|
Hi,
Consider you have a style defined in CSS file.. something like:
.Style1
{
font: 12pt verdana;
font-weight:700;
color:orange;
}
you can then use the cssClass like:
TextBox id="TextBox1" ForeColor="Red" CssClass="Style1"
You can even make use of codebehind file if you want to change it during runtime..but it will be available only for server controls.
Hope this helps.
Thanks
Sameer
Sameer
|
|
|
|
|
where i have to declare that.style1
|
|
|
|
|
You can declare it either in .aspx or create a CSS file.
Thanks
Sameer
|
|
|
|
|
ya i have done in the same way just i have right clicked the added one style sheet and i have changed the back color and some properties and changed in that cssclass property to that style sheet name it will not be changed
|
|
|
|
|
Hi,
You probably might have missed the Style attribute, check the below code:
/*
.Style1 { FONT: 700 12pt verdana; COLOR: orange }
<asp:label id="Label1" style="Z-INDEX: 102; LEFT: 336px; POSITION: absolute; TOP: 160px" runat="server"
="" cssclass="Style1">Label
*/
P.s. this is just a fragment of code and you need to write this in .aspx page.
Hope this help.
Thanks
Sameer
|
|
|
|
|
first you create stylesheet for a web page.
simply, drag and drop stylesheet under page section
in asp.net's all controls has class or cssClass attribut. which stylesheets class you want to use you write their name under class or cssClass.
|
|
|
|
|
If you are using thems. Create a default.css in your themes folder. You can set all your style information there.
|
|
|
|
|
Note vs2007 is horrible for css. - it is highly inefficient. & master pages/themes just don't cut it for high end css... Instead, design/create your page in Dreamweaver or other web design tool & do your vb/c# coding in vs2007.
Then, you can link to an external css file as follows:
This is much more efficient in terms of bandwidth.
|
|
|
|
|
Hello,
it is possible to add UserControls in Code behind?
Yours sincerely Benny
|
|
|
|
|
|
Yes, just instantiate a control object and add it to a placeholder on your page.
|
|
|
|
|
|
i want to know can we impliment javascript code in ASP.net as we use in ASP
if yes then please suggest me how to inmplment it.
TX.
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
Hi,
Yes you can surely do that. You need to add a client side script block in .aspx page and then you can write a javascript code block (functions..etc) there.
Hope this helps.
Thanks.
Sameer
|
|
|
|
|
please specify if there is any example code of that
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
|
thank for sample code happy coading
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|