|
hi, iam using asp.net with c#, with sql server 2000
in my gridview iam displaying data from view at page load event
the 1st column is checkbox in template field,2nd is categorynamee,3rd is itemkey, 4th is itemkeyname
5th is currentqty, 6th is salesprice,7th is quantity, 8th is total
i have to insert into two tables
1st table orders
orderno int primary key autoincrement,
username nvarchar(50) ,
shopname nvarchar(50),
email nvarchar(100)
2nd table is Orderdetails
serialno int primarykey autoincrement,
orderno int foreignkey,
categorynamee nvarchar(50),
itemkey nvarchar(50),
itemkeyname nvarchar(50),
currentqty decimal,
salesprice decimal,
quantity int,
total decimal
when user selects any no of the checkboxes that rows should be added in both tables, iam getting errors
can you give examples which helps me
|
|
|
|
|
So at the time of subit, Iterate throgh all the gridview rows and which row has checkbox checked, save it in database.You can save the data in both the table using query.
Where are you actually facing problem?
|
|
|
|
|
Easy, your code is wrong - what else do you expect it to be?
Without seeing your code or knowing what errors you are getting someone is meant to help you fix the problem. Can you see where the problem really lies?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
What errors are you getting?
developerit wrote: can you give examples which helps me
Search google, you'll find many examples on this.
|
|
|
|
|
Hi,
I have the following problem:
Two custom controls, first control has a button, when I click this button I'd like to render the second custom control content in popup window. How to do it?
Please, help.
|
|
|
|
|
So what is the problem, have a page with second custom control and on button click open that page in popup. You can also use ajaxmodelpopupextender.
|
|
|
|
|
You can use the AjaxControlToolkit to perform this action.
|
|
|
|
|
I would like to call some methods at the very beginning of my web application. Also, I want to ensure that those methods are called only once per application lifetime, no matter what. What is the best way to accomplish this?
|
|
|
|
|
TRY THIS
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
FillConatcsGrid();
CheckSessionId();
}
}
GoodLuck
|
|
|
|
|
This will not work as user may start my application from different page
|
|
|
|
|
If your methods are Application specific, and wiil be same for all then users then you can call your methopds from the function Application_Start of Global.asax file.
and if it user specific then you can call your methopds from the function Session_Start of Global.asax file.
|
|
|
|
|
Tnx, it was exactly what I asked for. Thank you
|
|
|
|
|
your welcome
|
|
|
|
|
You can use methods of Global.asax file
see help of Global.asax file in google
|
|
|
|
|
The Global.asax file is the central point for ASP.NET applications. It provides numerous events to handle various application-wide tasks such as user authentication, application start up, and dealing with user sessions.The Global.asax file, which is derived from the HttpApplication class, maintains a pool of HttpApplication objects, and assigns them to applications as needed. The Global.asax file contains the following event:
Application_Start : Fired when the first instance of the HttpApplication class is created. It allows you to create objects that are accessible by all HttpApplication instances.
you can use this event it to perform the actions you wanted.
|
|
|
|
|
Hey guys, I would display a calender when a user hovers over my dropdowlist box.
Is this possible?
I tried to use the SelectedIndexChanged and TextChanged events to make the calender
visible but it won't work. And yes autopostback is set to true.
Any ideas??
Thanks,
Morg
|
|
|
|
|
Instead of trying code behind, try javascript for mouseover event.
|
|
|
|
|
Thanks man, do you know what java script code you can use for that,
am not good with javascript..tried google and no help there.
Please help if you can.
Thanks
Morg
|
|
|
|
|
Without the code, its not possible to give some relevent answer
|
|
|
|
|
This is what I tried in my SelectIndexChanged event:
protected void DateFrom_SelectedIndexChanged(object sender, EventArgs e)
{
calDateFrom.Visible = true;
this.DateFrom.Text = calDateFrom.SelectedDate.ToString();
}
And it doesn't quiet work
|
|
|
|
|
It should be visible as per code.Try by default visible true and whether it is visible on the page or not..Also check might be it is getting false at some other point in application.
|
|
|
|
|
MorgSim wrote: protected void DateFrom_SelectedIndexChanged(object sender, EventArgs e)
This event will fire when you change dropdownlist item and won't fire on mouse over. If you want it on mouse over then you can try javascript.
|
|
|
|
|
Thanks man, am not that good with javascript though, but still trying out google.
If you know how I can handle this please help me...
Thanks,
Morg
|
|
|
|
|
Have a look at this.
Hope this helps.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
Thanks man I will go through your article
|
|
|
|