|
i hope my question is clear to all those who are too good in web designing.
I have a sign up page signup.aspx. which redirects to list.aspx. in list .aspx i select a particulasr customer and that customer id is passed to customer.aspx with the help of query string variables. when a logged in shopkeeper goes to customer.aspx, then on that customer .aspx there is a menu on the left which is menu.ascx. this menu has links to different sections of the customer and which ever link is cliked it should navigate to that link. now but to navigate to the section of the corresponding customer i need to pass in the customer id from that menu.ascx to abc.aspx or def.aspx. how do i do that. how will the menu.ascx recognize the customer id from customer.aspx. i dont want to use session variables because if a shopkeeper opens two customers at the same time then it will be a problem. following flow is more clear.
shopekeeper A logs in to system through signup.aspx
|
then a page with many customers is seen known as list.aspx
|
`the shopkeeper clicks any one of the customer and then goes to the main page of that custmer known as customer.aspx
on this customer.aspx there is a menu on left which is menu.ascx a user control which has navigation links to different sections of the selected customer.
|
if section 1 is selected then navigates to abc.aspx
if section 2 then def.aspx
section 3 then ghi.aspx
and so on
but i need the customer id in abc.aspx or def.aspx or ghi.aspc and i need to pass that from menu.ascx . then menu should get the customer id from customer.aspx.
now i want to do the above without using customer id as session varibales.
please advice
|
|
|
|
|
be_humble wrote: how will the menu.ascx recognize the customer id from customer.aspx
You said it's on the query string, so read it off there.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
well, the previous reply starts ya off . . . a cliff.
So, here's the paraglide kite so you can fly rather than fall.
This solution presented assumes these things:
0) you are after an 'easy' solution; no bells/whistles
1) The shopkeeper has multiple customers open at the same time (e.g. different tabs in IE7 / FireFox and/or different windows are opened when the shopkeeper clicks a customer's line
2) The customerID (custID) is passed as a query string on the customer.aspx page.
3) web user controls on the customer.aspx page need to know which customer is being viewed
- e.g. so the web user control, like Menu.ascx, can do a call to a database with the custID to figure out which menus to display or which prefs to display
==== Here's the solution:
1) On the customer.aspx Load method, get the custID from the query string and store it in a hidden field on customer.aspx
2) Create a method on each web user-control (ascx) that you call when the customer.aspx page loads, and pass in the custID to that web user control
- I have used some solutions which have a hidden field on each web user control to 'store' the custID; thus avoiding session variables or repeated calls on page.IsPostBack to 'reset' the custID on each web user control.
If this doesn't help, then hire a consultant.
ASPX ~ Apple Simply Performs eXcellently
|
|
|
|
|
How can we freeze gridview header without using css or javascript?
modified on Saturday, February 7, 2009 12:11 AM
|
|
|
|
|
You could try prayer.
Why would you ask how to do something, when you obviously already know what the tools are for doing it, but don't want to use them ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thank you very much
I ll try it.
But here the problem is ,i ve to change culture.
ie from english to arabic.
Then css or javascript wont work properly.
Thats why asked for any other method.
I ll pray and if i am lucky i ll post answer in this site
|
|
|
|
|
SreejithKumar M wrote: Then css or javascript wont work properly.
Why not ? What makes you think that ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I tried this in css
position:relative;
top:expression(this.offsetParent.scrollTop-5);
it is working in english
but not in arabic language
in arabic allignment direction is right to left
here gridview header is scrolling
|
|
|
|
|
Hi,
I got answer for this solution
I changed
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
to
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
in design page
Then i used follwing css
/* Div container to wrap the datagrid */
div#div-datagrid {
width: 420px;
height: 200px;
overflow: auto;
scrollbar-base-color:#ffeaff;
}
/* Locks the left column */
td.locked, th.locked {
font-size: 14px;
font-weight: bold;
text-align: center;
background-color: navy;
color: white;
border-right: 1px solid silver;
position:relative;
cursor: default;
left: expression(document.getElementById("div-datagrid").scrollLeft-2); /*IE5+ only*/
}
/* Locks table header */
th {
font-size: 14px;
font-weight: bold;
text-align: center;
background-color: navy;
color: white;
border-right: 1px solid silver;
position:relative;
cursor: default;
top: expression(document.getElementById("div-datagrid").scrollTop-2); /*IE5+ only*/
z-index: 10;
}
/* Keeps the header as the top most item. Important for top left item*/
th.locked {z-index: 99;}
/* DataGrid Item and AlternatingItem Style*/
.GridRow {font-size: 10pt; color: black; font-family: Arial; background-color:#ffffff; height:35px;}
.GridAltRow {font-size: 10pt; color: black; font-family: Arial; background-color:#eeeeee; height:35px;}
my aspx page is
<div id="div-datagrid">
<asp:GridView ID="gv5" Width="100%" runat="server" BorderStyle="Solid"
BorderColor="Navy" meta:resourcekey="gv5Resource1" UseAccessibleHeader="True">
<HeaderStyle BorderColor="Black" ForeColor="Black" BackColor="LightSkyBlue"
/>
<AlternatingRowStyle BackColor="Transparent" />
</asp:GridView>
</div>
like this
|
|
|
|
|
in aspx page add itemtemplet
|
|
|
|
|
I am tring to view an image from the SQL server, this is the error msg I get. Please help
this is my code:
string strSQL = "SELECT * FROM tblViewImage WHERE (ImageNumner= 1093414)";
SqlCommand cmd = new SqlCommand(strSQL, conn);
conn.Open();
SqlDataReader dr = cmd.ExecuteReader();
dr.Read();
{
Response.ContentType = dr["ImageType"].ToString();
Response.BinaryWrite((byte[])dr["ViewImage"]);
}
|
|
|
|
|
Have you checked to see what the ImageType is ? You really have a column called ImageNumner ? Why are you hard coding the number ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
The image type is a image/pjpeg. I tried this too and it did not work.
Response.ContentType = dr["ImageType"].ToString();
Response.Expires = 0;
Response.Buffer = true;
Response.Clear();
Response.OutputStream.Write((byte[])dr["ViewImage"], 0, Convert.ToInt32(dr["ImageSize"].ToString()));
Response.End();
|
|
|
|
|
Anita_Kamat_inds wrote: Convert.ToInt32(dr["ImageSize"].ToString()));
Wow - that makes sense.
Did you try writing the bytes to the file system and seeing if they are really a jpeg ? Have you tried more than one image from your DB ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I'm trying to get the AJAX timer control to work. There is a very simple example of this found here:
http://www.asp.net/ajax/documentation/live/tutorials/IntroToTimerControl.aspx
I followed the example yet the timer event never fires. What am I missing?
I'm using VS2005.
|
|
|
|
|
Your code is broken ? Is there a download with the sample, and if so, have you tried that ?
Why do people need the AJAX library just to put a timer in their pages ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I do not want to use AJAX. How can a incorperate a timer on a page without AJAX?
Please refer to the link in the orginal question for the sample code.
|
|
|
|
|
AJAX is just javascript. AJAX exists without the stupid Microsoft AJAX toolkit. There is only one way to have a timer on a page - with javascript. The AJAX toolkit is just wrapping a very basic web dev task for you.
[^]
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks for that info. Can you point to a javascript timer example?
|
|
|
|
|
The ^ in my post is a link. Sorry, I dunno what happened, I just pasted and CP auto formatted, I must have hit space or something, I expected you'd see the URL as well as the ^ for a new window.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Christian Graus wrote: Why do people need the AJAX library just to put a timer in their pages ?
Did I miss the CP announcement that today was Rhetorical Question Day?
The answer is that AJAX solves everything. One day it will discover the body of Jimmy Hoffa. I believe it will be found on an as yet undiscovered computing cloud.
|
|
|
|
|
led mike wrote: The answer is that AJAX solves everything. One day it will discover the body of Jimmy Hoffa
ROTFL !!!
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
|
I have generated dynamic database table in
which the colums will vary as per the selection
by the end user. Now, if my table name is car which
i have generated dynamically on the button save click
event it will have its colums like: colour, gears etc.
So can i generate a dynamic form by taking the cars id
and its column name as the textbox controls on the new
form. The new generated form will also have the basic
funtionality of add, edit,delete etc. If my table is car
then to generate dynamically car.aspx form or if table
is computer then
computer.aspx should be generated.
|
|
|
|