This server side code can not be be called unless the client side element has the runat=Server attribute.
=>2.Actually he called a function Test1() in his code so that i was created a 2 dummy functions for redirects based on the response for easy understand to him.
Again, where is it stated by the OP that a redirected was needed? By added unnecessary features you may have done more to confuse than to help.
=>3.Here i copied his code & made some changes & posted here so i didn't created any new variable.
From this we can tell you are probably very profeccient at copy and paste coding and don't fully understand what you are doing. If you knew what you where doing you should have corrected the OPs code and explained why.
You are right mate, still didn't completed my Master degree & i hope it will take a year to complete. And now i'm started to studying in latest things in those technologies so that i joined also Codeproject this month which is nice.
|Mark Nischalke wrote This server side code can not be be called unless the client side element has the runat=Server attribute.
but here the btnDelete is a server side element so that i was added the attribute in runtime. Again, where is it stated by the OP that a redirected was needed? By added unnecessary features you may have done more to confuse than to help.
I accept this one my mistake because i didn't thought about his confusion by the redirection code. It would be better if i put those alert messages instead of redirections inside those dummy functions. From this we can tell you are probably very proficient at copy and paste coding and don't fully understand what you are doing. If you knew what you where doing you should have corrected the OPs code and explained why.Actually already he was posted some sample code which has some issue. But i thought it would be better to make some changes in that code instead of writing an new one because he may be confuse here too. Also i have waited for his response. That's all.
Thanks for your feedback
Mate can you help me for my study by preferring things in technologies. Also i have visited your profile page but your blog isn't write mode for me. how to contact you? Please help. Thanks.
and if user clicks on ok then i have to redirect to another page
that is happening if on cancel then i have to focus him on a text
control. I will try for that. once again very thanks for your help
It is unnecessary to register the confirm script since you have already included it in the page.
<input type="button"value="Click Me" onClick="Confirm()"></input>
if (confirm("Are you sure you want to delete?"))
How do I go about my (asp.net) web application deployment?
Is it possible to package it as .exe file that will now be installed on any machine? If yes how.
How can I get Ms SQL client software so that the application can run on it.
How can I make sure that the first-time the (web) application is run, it runs my database script to create the application's database and other objects on the installation machine. Or to run the script while the application is installing.
Any other vital things for me to know about deployment. Please tell me.
1)Yes it is Possible. go to your Solution Explorer and Right click on the Root of your Solution and select a New Project and in the Dialog box , select other Project and you will see websetup. Give it a name and when you create a setup meaning when you are happy with your web app , then you need to build your setup to release not debug and a file in the Release folder in your setup Project Directory will be created. that is what you should ship.
2)Do you mean SQLExpress? google it you will find a lot of hits on that.
In my gridview, I want to count the number of times each value (based of course on a field in my gridview) occurs. For example, if I have a field called Dept, in my result there is the following:
What I am trying to do is to show that for each Dept A, the count is 3, and for Dept B, the count is 2 and for Dept C the count is 1. When I have my count, I want to save them into my hidden field, which I am going to use else where in my code.
I know I need to do this in my rowdatabound event, and I have had ago, but the results I am getting back are not correct.
GridViewRow row = new GridViewRow(-1, -1, DataControlRowType.DataRow, DataControlRowState.Normal);
rowValue.ID = "hdnNumRows";
rowValue.Value = counter;
lbl2.Text = Convert.ToString(counter);
cell.ColumnSpan = this.GridView1.Columns.Count;
cell.Width = Unit.Percentage(100);
cell.BackColor = System.Drawing.Color.Aqua;
HtmlGenericControl span = new HtmlGenericControl("span");
span.InnerHtml = prevStr;
tbl.Rows.AddAt(tbl.Rows.Count - 1, row);