|
hi,
I m working in asp.net 2005 with c# language. in that i hv used gridview . i hv 3 dropdownlist and 4 checkbox and textbox in edit mode.when i edit gridview the text box value shows proper database value where as dropdownlist doesnt bind the database value. in the same way checkbox value is stored as 1 or 0 in database. if the value is 1 ten the checkbox of gridview shud be checked.this is also not firing..
so pls help me to do these things
thanking you,
k.priya
|
|
|
|
|
What is the best way to retrieve data from SQL Server 2005 for a performance hungry web site? I was thinking of using sqlconnection+datareader+stored procedures but I'm not keen on the idea of writing sqlconnection every time. I like using typed datasets but I really need the maximum performance for the site and I don't know about it's performance. What do you think? Should I go for my own DAL? Or are there good DAL components that I'm not aware of that I could use? Any opinion is appreciated.
|
|
|
|
|
Just declare one connection string at the top of the page
Then use stored procedures
We are not a Code Charity
|
|
|
|
|
Your best bet is to use a sqlconnection and datareader. You biggest bottleneck will often be your sql queries. So if you have data that doesn't change very often use System.Web.Caching...
Do not use typed datasets, they are a performance killer. If you want you can use class objects to represent your data and use generic lists instead of typed datasets.
Also, you can call one stored procedure to get all of your data. Just return multiple result sets and use reader.next
I didn't get any requirements for the signature
|
|
|
|
|
Hi
I have a datatable having 10 records. I want to insert the 10 records to a table in a database using stroed procedure from my front end C#. How to do? can any one help me please?
Thanks in advance
kesavan
kesavan
|
|
|
|
|
Can you explain a bit more:
Are the values to be entered through a form
if so just create a loop and loop the insert for each new entry
We are not a Code Charity
|
|
|
|
|
put the code to insert one record in a loop (upto records count)
|
|
|
|
|
i have a requirement in asp.net
i bind the data to gridview and by using command field template i added delete option to each row
of gridview control.
my requirement is ...when i click on delete to delete the record from gridview...one message box has to
come with delete and cancel options and should ask me (are you sure you want to delete the
record).after i click on delete then the record has to delete.
i have tried to delete the record as i said above.but problems comes here.
when i click delete or cancel buttons in message box.the record is deleting.only when i click on delete
the record has to delete.
please anybody reply me
|
|
|
|
|
What are you using as the confirm message box? A javascript bit of code?
We are not a Code Charity
|
|
|
|
|
<asp:templatefield headertext="Delete">
<itemtemplate>
<asp:linkbutton id="lnkB" runat="Server" text="Delete" commandname="Delete">
Try this ......
|
|
|
|
|
<asp:TemplateField HeaderText="Delete">
<ItemTemplate>
<span onclick="return confirm('Are you sure to Delete the record?')">
<asp:LinkButton ID="lnkB" runat="Server" Text="Delete" CommandName="Delete"></asp:LinkButton>
</span>
</ItemTemplate>
</asp:TemplateField>
Try this ......
|
|
|
|
|
i have this below problem while executing a transaction.
I am trying to insert into two different tables with differnt values on the same btn_click event.It is taking the second table value not the first table
I am posting my code here-----
Dim mycommand As New SqlCommand
Dim myTrans As SqlTransaction
myTrans = myconnection.BeginTransaction()
mycommand.Connection = myconnection
mycommand.Transaction = myTrans
Try
mycommand.CommandText = "insert into tbl_student(st_cd)values(1)"
mycommand.CommandText = "insert into mst_year([Year],Start_Date,End_Date,year1)values('2002-2003','4/1/2002','4/12/2002','2005')"
mycommand.ExecuteNonQuery()
myTrans.Commit()
Catch ex As Exception
myTrans.Rollback()
Response.Write(ex.Message)
Finally
myconnection.Close()
End Try
In the above code values are insertig in mst_year table only,not in tbl_student.
I want to save in both tables.how it can be done?
kissy
|
|
|
|
|
Surely this
Kissy16 wrote: mycommand.CommandText = "insert into tbl_student(st_cd)values(1)"
is causing your problem...
We are not a Code Charity
|
|
|
|
|
thanks for ur response.
so what to do to solve my problem.suggest me with some example so that i can use transaction to insert values into differnt tables.
plzz help me out.
thanks in advance.
kissy
|
|
|
|
|
How can i get a snapshot image from a video file programatically? e.g. get the first frame of the video file.
Is there any free library i can import? in .net with c#
|
|
|
|
|
|
still putting question as their subject
We are not a Code Charity
|
|
|
|
|
namespace for following this one? using .net with c#
mPlayerWrapper mPlayerInstance = new mPlayerWrapper();
|
|
|
|
|
Still putting question as a subject
We are not a Code Charity
|
|
|
|
|
|
Hi All,
i have a requirement to change the language of my webpage at runtime by hitting on language buttons. i have gone through this article.
http://www.codeproject.com/KB/aspnet/DynamicWebMultiLanguages.aspx
i have one doubt in this. In this article they used resource files for each lang. under resource files they give the values for the strings which they have used in webpage.
But i have dynamic data showing i gridview which is retriving from database. for this how can i change the data to another language. hundreds of records will be in there in grid and data will change frequently.
G. Satish
|
|
|
|
|
Hi! I'm bit confused about 3-tier architecture and need some advice in the right direction.
1.If I'm having a single project in which I have separate classes for Business layer and separte class for Data access layer. Is it an example of 3-tier architecture???
2. If I'm having 3 separate projects, one only involved with displaying the data and one is a web service/window app invoked through remoting and the third application working as data tier. Is it a proper example of a 3 tier architecture??
Please correct my understanding or provide a link to a good article or ebook.
Thanks in advance.
Don't Quit
|
|
|
|
|
This is a good article and should help you:
http://www.c-sharpcorner.com/UploadFile/paulabraham/Building3TierAppPA11282005053625AM/Building3TierAppPA.aspx
We are not a Code Charity
|
|
|
|
|
Hello,
When ever I call the web method I get the below web method.
Message System.Web.Services.Protocols.SoapException: commandLine=OPSTMSTK Root=ProductStock EventReport=EventReport, Exception Message=SERVERNAME.Core.Connection: Read failed from remote server for header SERVERNAME:15101
at TEST.Core.ServiceHelper.WebServiceHelper.RaiseException(String webServiceNamespace, String errorMessage, String errorNumber, String errorSource, FaultCode code)
at TEST.Core.ServiceHelper.ServiceHelper.Run(String myXmlString)
at TEST.Core.ServiceHelper.ServiceHelper.RunTESTProgram(String TESTProgram)
at WSProductInfo.ProductStock.GetStatus(String ProductId, String Site)
The code is as below:
//Error code//
Applicaion.Accept.Order wsOrderAccept = new Applicaion.Accept.Order();
wsOrderAccept.getStatus()
//Error code//
If I write the below code twice (call web method 2 times), like if failed i.e throws an exception then go to catch and try again. In this case it works, strange!
Applicaion.Accept.Order wsOrderAccept = new Applicaion.Accept.Order();
try
{
wsOrderAccept.getStatus()
}
catch
{
wsOrderAccept.getStatus()
}
Any Idea....plz suggest some thing.
Regards,
Pavas
Regards,
Pavas
|
|
|
|
|
in one usercontrol i am using modalpopup,
to validate form i am using javascript, which is written in .js file.and
included from scriptmanager in masterpage.
now when i click on button,
javascript cannot get the control or can say clientid of control(e.g. textbox)
but this problem is in firefox only,it works perfet in ie.
anybody plz fix the problem.
thanks
VISHAL PAREKH
|
|
|
|