|
Hello Everyone,
Can anybody let me know how to "Edit" a record in GridView and also how to give a "CommandName" to a "Edit" button......................
|
|
|
|
|
Right click the GridView --> Properties then click the event tab, then double click the RowEditing column; This will create an event for editing.
HTML
<br />
<br />
"<"asp:GridView ID="GridView1" runat="server" OnRowEditing="GridView1_RowEditing" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"">"<br />
"<"Columns">"<br />
"<"asp:CommandField ShowEditButton="True" /">"<br />
"<"/Columns">"<br />
"<"/asp:GridView">"<br />
<br />
"<"/code">"<br />
<br />
Code Behind<br />
<code><br />
<br />
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)<br />
{<br />
<br />
}<br />
<br />
|
|
|
|
|
Hi,
Hope every one is fine. I am using ASP.NET 1.1 and SQL Server 2000. Initially i was using database which was located on vss server but now i want to host it on my local machine. i got the backup of database from server in form of .mdf file. now how can i add this in my existing application and use this as data source instead of the one located on vss server.
I copied it into the root directory of web site and changed the connectin string accordingly in web.config but its not working. i am facing following error:
"CREATE DATABASE permission denied in database 'master'."
Kindly guide me how can i solve this problem. Thanks in advance..
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
|
Hi,
I would like to know how to do Versioning for Webservices..I have read some articles saying we can create versioning by giving different endpoints for the webservices or by changing the URL.Can anyone help me in understanding this clearly.Your answers are valuable to me..
Thanks - Kalai.
|
|
|
|
|
|
Thanks for your reply and for the link too..
|
|
|
|
|
hi
I want to check the sessionID in my every page's page load event. Is there any proper way to chech it,it's urgent please replay soon
thanks in adv.
regards
bikash
|
|
|
|
|
|
I have converted my application from asp.net1.1 to 2.0 after successfull build when running its giving following error---
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "OptimaTest.NZResource.resx.resources" was correctly embedded or linked into assembly "App_GlobalResources.3wq22sqr" at compile time, or that all the satellite assemblies required are loadable and fully signed.
m using resource in following manner
RM = New ResourceManager("OptimaTest.NZResource.resx", System.Reflection.Assembly.Load("App_GlobalResources"), Nothing)
lblMainTitle.InnerText = RM.GetString("lblMainTitle")
and the error is on the second line.
could any one please suggest me any solution.
waiting
With Thanks & Regards
Amit Sk Sharma
|
|
|
|
|
Hi Guys,
I need to create an Application in C#/ASP.NET which can create an Website in SharePoint 2007.
Please send me information regarding this.
thank you
Mohamed Nazeem
Software Engineer
Bangalore
|
|
|
|
|
You can create webpart or cheat.
webpart: See MSDN docs on webparts
cheat: create a standard asp.net web site then use Sharepoint website pageviewer to embed the website inside sharepoint.
Cheating is much easier quicker.
|
|
|
|
|
i want to creat html textbox control using sql query.
u might get surprised n think it is not possible, but i have already used it in my last job but rite now i forgot the sql syntax, it is possible.
requirement was as follow
there was one grid in that one column containing textbox so that one can enter multiple values at a time an update it.
and this was done using sql query means i had written a sql query which was generate one colnm with textbox. mind it there wasn't any templated field.
i know it can be done through templatd control but i want that sql syntax.
roughly i can give idea og sql syntax. "select ''"
|
|
|
|
|
You can inject any text you like into your page, and it will render as HTML. If you want to store HTML in your database, you can. I can't imagine what purpose it serves, but it's not surprising that it works. HTML is text. Your DB stores text.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i want somthing like shown below
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim con As New SqlConnection("MyConnectionString")
Dim cmd As New SqlCommand("select '', * from Table1 ", con)
con.Open()
GridView1.DataSource = cmd.ExecuteReader
GridView1.DataBind()
con.Close()
End If
End Sub
this code giving error msg "Incorrect syntax near ' />'."
so result should display grid containing one colmn with textbox.
|
|
|
|
|
This is a pretty retarded way of trying to inject HTML into your grid. You can't actually hope to interact with it in any way, so what's the point ?
The problem is that you have your quotes messed up. I think '' does a quote in an SQL string. As it stands, it can't work out what quotes denote the edges of the constant string, and which are part of it
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Really, why not just use the built in item template to get proper runtime use out of your textboxes? all you're doing here is making this harder for other people to maintain by trying to be 'clever'.
|
|
|
|
|
mind it i m not tring to be 'clever'.
i just wanna know if there is another way of doing the same thing,
if u dnt know then no need of any comments...
|
|
|
|
|
You said in your post that you were aware that it could be done through a templated column. This would be the other way of doing it...
|
|
|
|
|
this is the 1st way i have for askd 2nd way of doing it
|
|
|
|
|
Mmm. But there's nothing wrong with the first (recommended) way of doing it?
|
|
|
|
|
my dear frnd m not intersted to knw what u recommend......
|
|
|
|
|
MaruBindiya wrote: not intersted to knw what u recommend
Then why ask a bloody question if you're not interested in the reply.
Some people!
|
|
|
|
|
Friends,
How to connect ASP.NET with MySql.?? What is the connection string for that.?
|
|
|
|
|
http://aspnet101.com/aspnet101/tutorials.aspx?id=39
|
|
|
|