|
good afternoon!
In a project of online shopping where number of sellers have there shops, developed in asp.net & c#.
I'm storing shopid in a session on one page and this shopid is then used to display related information of the shop .
For ex, on pressing "sold products" button we will get sold products of related shop.
Problem is that ,
If I opened one shop1 then went to another shop say shop2, now currently I have shopid of shop2 in session .
Now when we navigate to the previous page of the flow using browser's back button and click on the link "Sold product" I dont get sold products of shop1 but shop2. It means I'm getting information related to seesion value
currently in session.
Hope you might have got the problemm.Please guide.
Is there any way to obtain value of session variable from history??like that...
Thanks a lot!
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
Try with CrossPage Posting. for help Get it[^]
Regards,
Satips.
|
|
|
|
|
I am developing ASP.NET application .
I used nested datagrid.In this,I need to apply validator for each row.
But each validator of each row should not be applicable for other row.
Swapnil Bhavsar
-- modified at 7:34 Friday 30th March, 2007
|
|
|
|
|
Aoa..
I am creating popup window for searching employee record ....the senerio are as follow
Main form name (Visitor's Information) in which i select employee through popup window...but when i search employee in popup window i want to return specific search employee to my main form(Visitor's form)....i successfully created search form but not able to retrieve employeeid from my popup window to my main form.... i have an employeeid in my textbox
Regards,
Haseeb
|
|
|
|
|
using window.ReturnValue to get the employeeID
<< >>
|
|
|
|
|
i m using ASP.NET(2.0)...please give me the complete set of code/example in which i have to see completely....because as i m a new developer in ASP.NET
Regards,
Haseeb.
|
|
|
|
|
|
I Intend o build a Customized Control in Anthem in C Sharp, The control should have the feature that it should be just take table name and populate the record subsequently from the database.
Kindly can anyone guide me from where to start.
Ali
|
|
|
|
|
how to start building a customized Control ?
|
|
|
|
|
In gridview I have 3columns.. DoctorId,name and VisitDate.. I am binding data from database. but during runtime I don't want to diaply doctorid.
for this I have put code in pageload event like this:
GVDoctorActivity.Columns[0].Visible = false; ok. its fine. when I am trying to get the doctorid of selected row it is showing null.. when I put Visible= True am getting the value. I have written code in GridviewSElectedrowchanged event..
<asp:GridView ID="GVDoctorActivity" runat="server" AutoGenerateColumns="False" DataKeyNames="DoctorActivityId"
DataSourceID="DoctorActivityDataSource" SkinID="GridView"
EnableViewState="False" OnSelectedIndexChanged="GVDoctorActivity_SelectedIndexChanged"
<Columns>
<asp:BoundField DataField="DoctorId" HeaderText="DoctorId" SortExpression="DoctorId" />
<asp:BoundField DataField="DoctorName" HeaderText="Doctor Name" SortExpression="DoctorName" />
<asp:BoundField DataField="VisitDate" HeaderText="Visit Date" SortExpression="VisitDate" />
protected void GVDoctorActivity_SelectedIndexChanged(object sender, EventArgs e)
{
string strCampaign;
string DoctorId;
LinkButton LbtCampaign;
int rowIndex = GVDoctorActivity.SelectedIndex;
DoctorId =Convert.ToInt32(GVDoctorActivity.SelectedRow.Cells[0].Text); // getting null here if DoctorId visible is false..
LbtCampaign = (LinkButton)(GVDoctorActivity.SelectedRow.Cells[4].FindControl("lbtnCampaign"));
strCampaign = LbtCampaign.Text;
}
help me..
Thanks.
|
|
|
|
|
u have this..
irkahc wrote: <asp:gridview id="GVDoctorActivity" runat="server" autogeneratecolumns="False" datakeynames="DoctorActivityId"
="" datasourceid="DoctorActivityDataSource" skinid="GridView" enableviewstate="False" onselectedindexchanged="GVDoctorActivity_SelectedIndexChanged" <columns="">
<asp:boundfield datafield="DoctorId" headertext="DoctorId" sortexpression="DoctorId">
<asp:boundfield datafield="DoctorName" headertext="Doctor Name" sortexpression="DoctorName">
<asp:boundfield datafield="VisitDate" headertext="Visit Date" sortexpression="VisitDate">
in datakey u can bind doctorID and then when retreiving data
GVDoctorActivity.Datakeys(Seletedrow.index).value.tostring; to get ID.
Thanks,
Sun Rays
|
|
|
|
|
but the datakey is DoctorAcitvityId not DoctorId... I want to get non datakey name values and those are not visible in Gridview..
<asp:GridView ID="GVDoctorActivity" runat="server" AutoGenerateColumns="False" DataKeyNames="DoctorActivityId"
DataSourceID="DoctorActivityDataSource" SkinID="GridView" Font-Size="10pt" Width="920px"
EnableViewState="False" OnRowCommand="GVDoctorActivity_RowCommand">
|
|
|
|
|
irkahc wrote: GVDoctorActivity.Columns[0].Visible = false;
if it's working fine then after binding data to grid u can make it false.
Thanks,
Sun Rays
|
|
|
|
|
Pls see the code:
Page_Load()
{
GVDoctorActivity.Columns[0].Visible = false; //DoctorId
}
protected void GVDoctorActivity_RowCommand(object sender, GridViewCommandEventArgs e)
{
int DoctorID;
DoctorID = Convert.ToInt32(GVDoctorActivity.SelectedRow.Cells[0].Text); // throwing exception here.bcoz it is returning null value..
}
|
|
|
|
|
Yes correct. now working..I gave that after binding. Thank you verymuch Sun Rays..
|
|
|
|
|
hi
i have a web application in which i am allowing the user to upload an excel file on my server. i want this excel file to be stored directly in my oracle server.it's not just the file. i would like to insert row by row data in my table.can anyone help me in that. pls send me the code to do this. i am making my application in visual studio 2005, .net framework 2.0 and oracle server 10g.
thanks
|
|
|
|
|
Cant send email with link to CSS file.
When mail server receives new letter, he clears out all "style" attributes from mail content plus replace the link to CSS file ().
Please anybody help ASAP.
|
|
|
|
|
You can write your logic in datagrid_itemcommand event!
Give two seperate command names for your link buttons.
In your event you can give - if(e.commandname="lnkbtn1").....
do your coding accordingly.
Hope this helps!
Gautham
|
|
|
|
|
hi, u can modify your post if u have missed something.. dont post same thing again and again..
Thanks,
Sun Rays
|
|
|
|
|
I need help regarding ASP Calendar control. I am developing one web page in which I am displaying a calendar (month view) using ASP Calendar control.
And I am displaying jobs on particular day. i.e. if job starts on March 1 then I will have to display that job on March 1 cell and so on.
Now what I need to do is to display a bar in the calendar as per the start date and end date of the particular job. i.e. if job starts on March 1 and ends on March 5 then I will have to display a bar starting from March 1 to March 5 and that particular job number on this bar just like Google Calendar. When we create an event in Google Calendar from one date to another date, you will get to see one bar displaying from one date to another date.
|
|
|
|
|
In a Gridview there are two templated linkbutton columns. I want to know that on which link(dataitem) the user has clicked.. data is bounded from database... Can any one help me?
pls see the code..
<asp:gridview id="GVDoctorActivity" runat="server" autogeneratecolumns="False" datakeynames="DoctorActivityId"
="" datasourceid="DoctorActivityDataSource" skinid="GridView" font-size="10pt" width="920px" enableviewstate="False" onselectedindexchanged="GVDoctorActivity_SelectedIndexChanged">
<columns>
<asp:boundfield datafield="DoctorId" headertext="DoctorId" sortexpression="DoctorId" visible="True">
<asp:templatefield headertext="Campaign Name">
<itemtemplate>
<asp:linkbutton commandname="Select" id="lbtnCampaign" runat="server" causesvalidation="false" text="<%# Eval("CampaignName")%>"
="" <="" asp:linkbutton="">
<asp:templatefield headertext="ProductName">
<itemtemplate>
<asp:linkbutton commandname="Select" id="lbtnCampaign" runat="server" causesvalidation="false" text="<%# Eval("ProductName")%">
The user may click on any one either on CampaignName or ProductName dataitem... I want to know on which item the user has clicked...? I am using asp.net 2.0 and C#
|
|
|
|
|
hi,
for that u have to set property of that linkbutton set commandName="CampaignName" and for second one commandName="ProductName" and gridview's rowcommand event get which command is fire...
Thanks,
Sun Rays
|
|
|
|
|
ok thanks. the message has been posted many times. sorry for this inconvenience bcoz of some connection problems...
|
|
|
|
|
Hi Sun Rays the code you sent is working fine but it is not meet my requirement. My requirement is in Grideview-SelectedIndexChanged event I have to find out.. pls see the code
protected void GVDoctorActivity_SelectedIndexChanged(object sender, EventArgs e)
{
string strCampaign;
LinkButton LbtCampaign;
int rowIndex = GVDoctorActivity.SelectedIndex;
LbtCampaign = (LinkButton)(GVDoctorActivity.SelectedRow.Cells[4].FindControl("lbtnCampaign"));
strCampaign = LbtCampaign.Text;
lbProducts.DataSource = adapterCampaignDrug.GetProductsByCampaignId(1);
lbProducts.DataTextField = "SKU";
lbProducts.DataBind();
Panel3.Visible = true;
MultiView1.ActiveViewIndex = 0;
}
in this event am getting the perticular column data item. if i put this code in rowcommandevent it is giving error... so in this eventonly i want to know which itemhas been clicked.. can you tell me how I can approach?
|
|
|
|
|
u can do this i have vb.net code
If e.CommandName = "comm1" Or e.CommandName = "comm2" Then
Dim row As GridViewRow
row = CType(CType(e.CommandSource, WebControl).Parent.Parent, GridViewRow)
If row IsNot Nothing Then
Dim lbtn As LinkButton
lbtn = CType(row.FindControl("lbtn"), LinkButton)
irkahc wrote: LbtCampaign = (LinkButton)(GVDoctorActivity.SelectedRow.Cells[4].FindControl("lbtnCampaign"));
for this u can write this,,
LbtCampaign = CType(row.Cells[4].FindControl("lbtnCampaign"), LinkButton)
End If
end if
Thanks,
Sun Rays
|
|
|
|