|
hi every one .
i have a query .actually i am taking a selected value of the dropdown box in session variable .at second page the value of session variable remains 2. if i select 2 from drop down box at page 1.but at page three it gives the value of session 1 (the intial value of dropdownbox) .
plz advice what should i do.
thanks...gaurav
|
|
|
|
|
The value of a session variable doesn't change by itself, so somewhere you have code that changes it.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanks for the response
actually i am using to pass some value from one page to other page by hidden fields and some values by using hidden fields. is it possible to use session with hidden fields.
if i am passing values using sessions only then its working otherwise not.
plz tell me .
|
|
|
|
|
Hidden fields and session variables work completely independently, so there is no conflict in using both.
A session variable is just a session variable and a hidden fields is just a hidden field. It all depends on what your code is doing with them, so without seeing any of the code it's practically impossible to say if there is something wrong with the code.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi all,
I m building a site for storing user data and Files. like
Photos,Resume etc.
But i don't know how to attach files IN DATABASE.
PLEASE SEND ME CONCEPT OF OLE LINKING.
THANKS
|
|
|
|
|
Store ur file(Resume or some thing else) in under one folder...,
The file path will be in ur db column filed...,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Hi All,
Is it possible to direct send information to report viewer without using any database.
Pls help It's needful.
Thanks
|
|
|
|
|
Hi,
You can send values in forms of parameters.
prabhakar
|
|
|
|
|
Please describe in detail.
Thanks
|
|
|
|
|
Hi my table structure is like this:
eid ename Mid
100 N1 103
101 N2 100
102 N3 100
103 N4 0
It mean, the employee having leaders...,
The structure is like this:
N2 & N3 both of them coming under N1 employee(Team Leader)
N1 coming under N4 employee(Project Leader)...,
So they are reporting to them head...,
Suppose the Team Leader( N1) is not there they can directly report to N4 also...,
So how to find leader of the employee...,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Try this
Select a.Ename, b.Ename From Table a Left outer join Table b On (b.Eid = a.Mid). I think it will give result.....reply me
Balasubramanian K.
|
|
|
|
|
Ok but where is the id of manager?, and employee?...,
If u give id of the employee and manager field...,
How u will structure it?
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
This is sample....include and re arrange the query however you want..
Balasubramanian K.
|
|
|
|
|
Ok thank u
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
the site contain introduction of company and terms of service usually.
these contents are not often changed.
Are these page designed static or dynamic?
hwo save these long text?
|
|
|
|
|
If your site is intracted by user means your site need database so u can use dynamic another use static.
|
|
|
|
|
Hi
is there any tool like fileupload in windows. actualy i need to upload picture files to a particular folder. i tried open file dialog but could not get idea how to use it for the same.
thanx
|
|
|
|
|
you can do it with the help of a textbox and file open dialog box
|
|
|
|
|
can you please tell me how? i mean to say which properties i have to set or which methods i have to use? actually i need to upload picture file and at the same time i need to insert its path into database.
|
|
|
|
|
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
OpenFileDialog1.ShowDialog()
If Windows.Forms.DialogResult.OK Then
TextBox1.Text = OpenFileDialog1.FileName
End If
End Sub
|
|
|
|
|
Sir i think here i can get path only but could not upload the file from some folder to my application's folder. how can i do that?
|
|
|
|
|
try
Application.StartupPath
|
|
|
|
|
I am working on a page where I am synamicall creating controls, and then adding events to those controls.
Those events are not firing on the first click, but they are firing on th second click.
Here is my code for the page.
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using com.chrome.kp.configcompare3;
using System.Drawing;
public partial class new_build3 : System.Web.UI.Page
{
public master_MasterPage mast = new master_MasterPage();
public com.chrome.kp.configcompare3.Configuration configStyle;
protected void Page_Init(object sender,EventArgs e)
{
try
{
if (!IsPostBack)
{
ConstructData cd = new ConstructData();
HyperLink7.NavigateUrl = "/new/build5.aspx?styleid=" + Request["styleid"].ToString() + "&extcolor=" + Request["extcolor"].ToString() + "&int=" + Request["cobinationid"].ToString().Split('~')[0];
configStyle = (com.chrome.kp.configcompare3.Configuration)Session["configStyle"];
imgcar.ImageUrl = mast.convertmoney(configStyle.style.stockPhotoUrl.ToString());
lblmsrp.Text = mast.convertmoney(configStyle.style.baseMsrp.ToString());
lbloptions.Text = mast.convertmoney(configStyle.configuredOptionsMsrp.ToString());
lblinvoice.Text = mast.convertmoney(configStyle.style.baseInvoice.ToString());
lbltotal.Text = mast.convertmoney(configStyle.configuredTotalMsrp.ToString());
lbldest.Text = "(Includes Destination Charge: $" + configStyle.style.destination.ToString() + ") ";
lblextcolor.Text = Request.QueryString["extcolor"].ToString();
lblintcolor.Text = Request["cobinationid"].ToString().Split('~')[0];
if (Request["cobinationid"].ToString().Split('~')[1] != "")
{
SelectColorRequest colorReq = new SelectColorRequest();
colorReq.accountInfo = (AccountInfo)cd.configAccountInfo("US");
colorReq.combinationColorId = Request["cobinationid"].ToString().Split('~')[1];
colorReq.configurationState = configStyle.style.configurationState;
colorReq.returnParameters = null;
com.chrome.kp.configcompare3.ConfigurationElement newConfigStyle = cd.configService.selectColor(colorReq);
Session["configStyle"] = newConfigStyle.configuration;
}
}
}
catch { }
LoadOptions();
// img.Init += new System.EventHandler(imgb_Click);
}
protected void Page_Load(object sender, EventArgs e)
{
}
private void LoadOptions()
{
com.chrome.kp.configcompare3.Configuration configStyle = (com.chrome.kp.configcompare3.Configuration)Session["configstyle"];
int ids = 0;
tblOptions.Rows.Clear();
Option[] options = configStyle.options;
Hashtable optionsHash = new Hashtable();
foreach (Option option in options)
{
String primaryDescription = "";
String extendedDescription = "";
foreach (OptionDescription od in option.descriptions)
{
if (od.type == OptionDescriptionType.PrimaryName)
{
primaryDescription = od.description;
}
else if (od.type == OptionDescriptionType.Extended)
{
extendedDescription = od.description;
}
}
String optionHeaderName = option.headerName;
String optionFields = option.selectionState.ToString() + "~" +
primaryDescription + "~" +
extendedDescription + "~" +
option.oemOptionCode + "~" +
option.chromeOptionCode + "~" +
option.invoice.ToString() + "~" +
option.msrp.ToString() + "~";
ArrayList optionsGroup = (ArrayList)optionsHash[ optionHeaderName ];
if (optionsGroup == null)
optionsGroup = new ArrayList();
optionsGroup.Add(optionFields);
//remove old arraylist group and replace with new
optionsHash.Remove(optionHeaderName);
optionsHash.Add(optionHeaderName, optionsGroup);
}
AccordionOptions.Panes.Clear();
bool isLight = true;
foreach (DictionaryEntry de in optionsHash)
{
String optionHeader = (String)de.Key;
if (optionHeader != "PAINT TYPE" )
{
AjaxControlToolkit.AccordionPane pane = new AjaxControlToolkit.AccordionPane();
Label head = new Label();
head.Text = optionHeader;
pane.HeaderContainer.Controls.Add(head);
Table tbl = new Table();
tbl.Font.Name = "Arial";
tbl.Width = 950;
tbl.Font.Size = 10;
ArrayList optionGroup = (ArrayList)de.Value;
foreach (String optionFields in optionGroup)
{
TableRow row = new TableRow();
if (isLight)
{
row.BackColor = Color.FromArgb(234, 234, 234);
isLight = false;
}
else
{
row.BackColor = Color.FromArgb(168, 168, 168);
isLight = true;
}
String optionState = optionFields.Split('~')[0];
String optionDesc = optionFields.Split('~')[1];
String optionExtDesc = optionFields.Split('~')[2];
String manufacturerOptionCode = optionFields.Split('~')[3];
String chromeOptionCode = optionFields.Split('~')[4];
String optionInvoice = optionFields.Split('~')[5];
String optionMsrp = optionFields.Split('~')[6];
TableCell cell = new TableCell();
cell.Text = optionDesc;
TableCell cell2 = new TableCell();
cell2.Text = manufacturerOptionCode;
TableCell cell3 = new TableCell();
cell3.Text = mast.convertmoney(optionMsrp);
TableCell cell4= new TableCell();
cell4.Text =mast.convertmoney(optionInvoice);
ids++;
ImageButton imgb = new ImageButton();
imgb.ID = chromeOptionCode+ids.ToString();
imgb.CommandName = chromeOptionCode;
imgb.Click += new ImageClickEventHandler(imgb_Click);
if (optionState == "Excluded")
{
imgb.ImageUrl = "/controls/construct/images/excluded.gif";
} else if ( optionState == "Included" ) {
imgb.ImageUrl = "/controls/construct/images/included.gif";
} else if ( optionState == "Required" ) {
imgb.ImageUrl = "/controls/construct/images/required.gif";
} else if ( optionState == "Selected" ) {
imgb.ImageUrl = "/controls/construct/images/selected.gif";
} else if ( optionState == "Unselected" ) {
imgb.ImageUrl = "/controls/construct/images/unselected.gif";
} else if ( optionState == "Upgraded" ) {
imgb.ImageUrl = "/controls/construct/images/upgraded.gif";
}
CheckBox ck = new CheckBox();
ck.ID = chromeOptionCode;
TableCell cell5 = new TableCell();
cell5.Controls.Add(imgb);
row.Cells.Add(cell5);
row.Cells.Add(cell);
row.Cells.Add(cell2);
row.Cells.Add(cell3);
row.Cells.Add(cell4);
tbl.Rows.Add(row);
if (optionExtDesc != null && optionExtDesc.Length > 0)
optionDesc += ", " + optionExtDesc;
}
pane.ContentContainer.Controls.Add(tbl);
AccordionOptions.Panes.Add(pane);
}
}
}
protected void imgb_Click1(object sender, EventArgs e)
{
}
protected void imgb_Click(object sender, EventArgs e)
{
tblOptions.Rows.Clear();
OtherStuff os = new OtherStuff();
ConstructData cd = new ConstructData();
AccountInfo accountInfo = (AccountInfo)cd.configAccountInfo("US");
ImageButton imgb = (ImageButton)sender;
//get config style
com.chrome.kp.configcompare3.Configuration configStyle = (com.chrome.kp.configcompare3.Configuration)Session["configStyle"];
String originatingOptionCode = imgb.CommandName.ToString();
ToggleOptionRequest toggleRequest = new ToggleOptionRequest();
toggleRequest.accountInfo = accountInfo;
toggleRequest.configurationState = configStyle.style.configurationState;
toggleRequest.chromeOptionCode = originatingOptionCode;
toggleRequest.returnParameters = null;
ToggleOptionResponse optionToggleResponse = cd.configService.toggleOption(toggleRequest);
string ssnoption = null;
//save config style
com.chrome.kp.configcompare3.Configuration newConfigStyle = optionToggleResponse.configuration;
Session["configStyle"] = newConfigStyle;
configStyle = newConfigStyle;
int ids = 200;
PlaceHolder ph = new PlaceHolder();
if (optionToggleResponse.requiresToggleToResolve)
{
// resolveoptions.Value = "false";
String conflictingOptionsAndDescs = "";
//get conflicting option codes and descriptions
String[] conflictingOptions = optionToggleResponse.conflictResolvingChromeOptionCodes;
for (int i = 0; i < conflictingOptions.Length; i++)
{
String conflictingOptionCode = conflictingOptions[i];
if (i > 0 && i < conflictingOptions.Length)
conflictingOptionsAndDescs += ";;";
Option[] options = newConfigStyle.options;
for (int j = 0; j < options.Length; j++)
{//
Option option = options[j];
if (option.chromeOptionCode == conflictingOptionCode)
{
TableRow row = new TableRow();
TableCell cell = new TableCell();
String optionNameS = "";
for (int c = 0; c < option.descriptions.Length; c++)
{
if (option.descriptions[c].type == OptionDescriptionType.PrimaryName)
{
optionNameS = option.descriptions[c].description;
}
}
cell.Text = optionNameS;
TableCell cell2 = new TableCell();
cell2.Text = option.msrp.ToString();
TableCell cell3 = new TableCell();
cell3.Text = option.msrp.ToString();
TableCell cell4 = new TableCell();
cell4.Text = option.msrp.ToString();
ids++;
CheckBox ck = new CheckBox();
ck.ID= option.chromeOptionCode.ToString()+"1"+ ids.ToString();
ck.CheckedChanged += new EventHandler(imgb_Click);
ck.AutoPostBack = true;
ImageButton imgbb = new ImageButton();
imgbb.ID =option.chromeOptionCode.ToString();
imgbb.CommandName = option.chromeOptionCode.ToString();
imgbb.Click += new ImageClickEventHandler(imgb_Click1);
ssnoption = ssnoption+","+option.chromeOptionCode.ToString();
string optionState = option.selectionState.ToString();
if (optionState == "Excluded")
{
imgbb.ImageUrl = "/controls/construct/images/excluded.gif";
}
else if (optionState == "Included")
{
imgbb.ImageUrl = "/controls/construct/images/included.gif";
}
else if (optionState == "Required")
{
imgbb.ImageUrl = "/controls/construct/images/required.gif";
}
else if (optionState == "Selected")
{
imgbb.ImageUrl = "/controls/construct/images/selected.gif";
}
else if (optionState == "Unselected")
{
imgbb.ImageUrl = "/controls/construct/images/unselected.gif";
}
else if (optionState == "Upgraded")
{
imgbb.ImageUrl = "/controls/construct/images/upgraded.gif";
}
ph.Controls.Add(imgbb);
TableCell cell5 = new TableCell();
cell5.Controls.Add(imgbb);
row.Cells.Add(cell5);
row.Cells.Add(cell);
row.Cells.Add(cell2);
row.Cells.Add(cell3);
row.Cells.Add(cell4);
tbl_addOptions.Rows.Add(row);
String optionName = "";
for (int k = 0; k < option.descriptions.Length; k++)
{
if (option.descriptions[k].type == OptionDescriptionType.PrimaryName)
{
optionName = option.descriptions[k].description;
}
}
conflictingOptionsAndDescs += conflictingOptionCode + "::" + optionName;
break;
}
}
}
Session["imgbb"] =ph;
String manuCodeAndDesc = "";
for (int i = 0; i < newConfigStyle.options.Length; i++)
{
Option option = newConfigStyle.options[i];
if (String.Compare(option.chromeOptionCode, originatingOptionCode, true) == 0)
{
String optionName = "";
for (int j = 0; j < option.descriptions.Length; j++)
{
if (option.descriptions[j].type == OptionDescriptionType.PrimaryName)
{
optionName = option.descriptions[j].description;
}
}
manuCodeAndDesc = option.oemOptionCode + ";;" + optionName;
break;
}
}
}
imgcar.ImageUrl = mast.convertmoney(configStyle.style.stockPhotoUrl.ToString());
lblmsrp.Text = mast.convertmoney(configStyle.style.baseMsrp.ToString());
lbloptions.Text = mast.convertmoney(configStyle.configuredOptionsMsrp.ToString());
lblinvoice.Text = mast.convertmoney(configStyle.style.baseInvoice.ToString());
lbltotal.Text = mast.convertmoney(configStyle.configuredTotalMsrp.ToString());
lbldest.Text = "(Includes Destination Charge: $" + configStyle.style.destination.ToString() + ") ";
LoadOptions();
}
}
|
|
|
|
|
Please post only the suspect code that maybe causing the problem, rather than all of it
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Can any one help me with the javascript part
protected void Button1_Click(object sender, EventArgs e)
{
/* The code to send values to database*/
/* AFTER SUCCESSFUL SENDING OF VALUES A JAVASCRIPT ALERT CONFIRMATION WITH OK BUTTON WHEN USER CLICK OK REDIRECT TO HOME.ASPX PAGE */
}
thanks in advance.
|
|
|
|