how can i add new row to the gridview without reload the old already created rows,because i have a gridview with 2 templete column one of them are dropdownlist ,when i create new row with the same critera the dropdown list in the first row reload from start and dont have the last selected value
so how can i create new row and the first row keep(stored) the value in it
how can i do that ?
thanks for advice
Where we can use HTML controls?please give me some example.I think in order form that a customer want to see a preview of her order.is it correct?
There are no more differece between htmlControl and WebControl.The main defference is that webControls have default runat="server" while htmlControls do not have.
so that htmlControls are not accessible in code behind page but if you set runat="server" property of that control then it work like as webcontrol but with its own property values
you use input text and you set runat="server" to it then you can access the value of this control in code behind side by using "Value" property ot "Text" like as textbox
please don't forget to vote on the post that helped you.
I have an Authentication part in my website (which is written in .net) in my local system every thing is ok but when I move it to our server, when some one authenticates every thing goes well as he is authenticated and no error is thrown but he is not authenticated and he redirects to login page as he is anonymous! I though may it is because of the server time setting so the cookie is expired but it was not! at last after too much trying I decided to check it on another server and this time it worked correctly!! so I think there is some settings in IIS which cause this problem but as I have searched by now I found nothing! every help or suggestion would be very helpfull,
thanks in advanced.
WOW I can not believe I didnt notice that.
I have making a v2 for my company for a ticketing software and used the same method in the last one. It worked... because I did use cp = new ControlParameter().
I was combining the two to see if I could figure it out and I over looked that... WOW
This control is being used in other user controls.
In my main aspx page, I have used multiview control, to use for tabstrip.
when I am on one tab, and if help button is clicked, helptooltip opens.
without closing that tooltip if I move to other tab, the tooltip is still open.
I would like to close that popup when I move from one tab to other.
I tried to use mouseover and mouseout events for the tooltip as:
Is there a way to create a config file that controls the elements on specific pages. For example I have 2 pages viz. page1.aspx and page2.aspx. I want to have a config file in which I can control the visible property of the textbox controls on both pages.
Something like this:-
<page id = "page1.aspx">
<control1 ID = "Textbox1" Visible = "false">
<page id = "page2.aspx">
<control1 ID = "Textbox1" Visible = "true">
I have a need to enter names and addresses throughout a web application. How can I create a control (C#) that I can include in a FormView control that will allow names and addresses to be entered with the fields bound to a datasource via a Formview Template?
public void Insert()
string query =
"INSERT INTO WordTable (Word_ID,Word,Help) " +
SqlConnection conn = new SqlConnection(cs);
SqlCommand cmd = new SqlCommand(query, conn);
cmd.Parameters.Add(new SqlParameter ("@Word",this.word));
cmd.Parameters.Add(new SqlParameter ("@Help",this.Help));
And the exception is
System.Data.SqlClient.SqlException was unhandled by user code
Message="String or binary data would be truncated.\r\nThe statement has been terminated."
Source=".Net SqlClient Data Provider"
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at SQLWord.Insert() in e:\asp.net\hangaro\App_Code\SQLWord.cs:line 48
at WordList.AddWord(SQLWord w) in e:\asp.net\hangaro\App_Code\WordList.cs:line 52
at Add_Word.WriteToSQL() in e:\asp.net\hangaro\Add_Word.aspx.cs:line 60
at Add_Word.Add_Click(Object sender, EventArgs e) in e:\asp.net\hangaro\Add_Word.aspx.cs:line 36
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I have checked the values of this.Word_ID etc...
What shall I do ?
I have a text box, which will take input from user in hr:min:sec format.
I would like to verify:
1. User enters the in correct format,
2. I would like to verify of the values are correct, e.g. for hrs < 24, for mins it should be less than 60 and simillarly for sec should be less than 60.
or is there any way, that I can set the text box to take user input as hrs:min:sec format. pls guide me. thanks