|
check box is not enable - tat is the problem we r facing
|
|
|
|
|
Hi! I guess this is quite simple for some of you guys out there, but I am stuck whole morning with this issue. I do have a gridview control, and I have a button which will select the row where the checkbox is existing. After the gridview is selected, when the button is selected I want to put all the data in a strings, and play with that. Any help? Thx ahead, Laziale
|
|
|
|
|
Can you show your piece of code?
Cheers!!
Brij
|
|
|
|
|
<asp:GridView ID="gridviewClass" runat="server" AutoGenerateColumns="False">
<Columns>
<asp:BoundField HeaderText="Class Name" DataField="Class_Name"/>
<asp:BoundField HeaderText="Type" DataField="Type" />
<asp:BoundField HeaderText="Members Attending" DataField="MembersAttending" />
<asp:BoundField HeaderText="Staff" DataField="Staff" />
<asp:BoundField HeaderText="Date/Time" DataField="DateSelected" />
<asp:BoundField HeaderText="Explanation" DataField="Explanation" />
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox runat="server" ID="checkBoxSelect" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView> <br />
<asp:Button ID="ButtonEdit" runat="server" Text="Edit Class" />
I haven't do any coding for the ButtonEdit_Click event, cause there I am stuck and I don't know how to get the selected row with checkbox. Thx for helping me out...
|
|
|
|
|
Every Row has a checkbox Right?Can you provide your requirement in detail.
Are you hiding checkbox sometimes based on some conditions? or anything else?
Cheers!!
Brij
|
|
|
|
|
ok...here is where I am stuck now. I declared a gridviewClass.AutoGenerateSelectButton = true in the Page_Load method, now how I can get the text from each field from the selectedrow and put them in a string?
I tried with string test = ((TextBox)gridviewClass.SelectedRow.FindControl("Type")).Text; where 'Type' is the datafield what is attached to the asp:BoundField from the gridview control, but I am getting a NullReferenceException: Object reference not set to an instance of an object. Please someone out there help me. Thx ahead, Laziale
|
|
|
|
|
I solved!!!! for someone else who might get this problem:
I used this: string test = gridview1.SelectedRow.Cells[i].Text;
have a nice day!!!!
|
|
|
|
|
You might want to write it something like this
String test += gridview1.SelectedRow.Cells[i].Text;
Otherwise you will only up with the text from the last selected row.
Good job on solving the problem and thank you for solving the problem ,
Prateek
|
|
|
|
|
Hi,
I m uploading a video file and saving it in a folder .I want to create a thumbnail image of that wmv file so that I can display my videos list in a datalist control.Plz Help me to do this.
|
|
|
|
|
div_gusain wrote: .I want to create a thumbnail image of that wmv file
What does it mean ? You want to create Thumbnil image of wmv files
|
|
|
|
|
Yeah I want to create a thumbnail image by framing that video.so that I can display the videos list and Onclick of that video will be played.If u know any other option to list the videos than plz tell me.Thanx in advance!
|
|
|
|
|
There;s several samples of how to do this on CP. it has nothing to do with ASP.NET tho, it's a general C# question.
From memory the dll you import to do this is called dexter, or something like that.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Dear All,
I have an application(asp.net with Vb.net Code), where I am using a drop down list to change the language.In my page,there are 5 views(multiview concept), each view is related to the first view contents. so when i am in 3rdview or some other view other than first view,and change tha language,that particular view should be instantaneously changed without going to the first view.can you help me in solving this problem.Basically now when i Change the language, it will reload the page and first view will be shown.Hope that, there will be a early response from you.
Thanking You before Reply,
Sundeep G
|
|
|
|
|
Hi all,
How to validate the telephone number of this format
eg:123232-23131 or 2323123123 that is it may include "-" or not the telephone number should be validate.
i am using RegularExpressionValidator and
ValidationExpression="^\d*[0-9]$"
please help..
JohnDas
|
|
|
|
|
Did you try Custom Validator which is available with asp.net 2.0 ?
|
|
|
|
|
Hello everyone,
I am deploying an ASP.Net web site, and there are related configurations, pages and binaries. There is also a related application pool related to this web site.
My question is, what is the graceful way to upgrade to an existing such type of web site? Drop the previous web site and install a new one? Any documetns or samples to make reference about how to write scripts to do such assignment automatically?
thanks in advance,
George
|
|
|
|
|
George_George wrote: Drop the previous web site and install a new one?
No !!
You can have a look on Copy web Tool ,Which provided with VS .
Another approches, when you publishing the sites, from Visual Studio, there is a checkbox, make Sites updateable.
Check for Overview[^]
|
|
|
|
|
Hi Abhijit,
Do you have a step-by-step Copy web Tool document or samples to make a reference? I did a lot of search but can not find. In MSDN, there is just document like this, what I want to have is a step-by-step guide tells me which menu I should click and fill-in what value. The MSDN document tells nothing about this topic. Thanks.
http://msdn.microsoft.com/en-us/library/1cc82atw(VS.80).aspx[^]
regards,
George
|
|
|
|
|
George_George wrote: My question is, what is the graceful way to upgrade to an existing such type of web site?
Is that website up and running currently? If yes, the most used method is to take the website down at the time of upgrade. Show users a nice message describing the upgrade and expected uptime. Read about app_offline.htm file.
|
|
|
|
|
Thanks Navaneeth,
Why not using online upgrade approach? What are the major issues?
regards,
George
|
|
|
|
|
George_George wrote: Why not using online upgrade approach?
I didn't get that. Do you mean deploying without taking the site down? If yes, that may show some incorrect results for visitors as some part of the program is getting updated. When the assemblies or config files changes, ASP.NET will recycle the worker process which will make the site slow. It is better to take it down, do the upgrade and put it back online.
|
|
|
|
|
Thanks Navaneeth,
1.
"ASP.NET will recycle the worker process which will make the site slow" -- Do you mean ASP.Net will automatically detect binaries files change (under bin folder)? Why it will make system slow?
2.
If I "deploying without taking the site down", I am not sure whether clients of the web site will met with errors during the upgrade process -- I have this confusion because I am not sure whether the existing worker process which is using old version dll (which is replacing with new dll under upgrade process) will have issues?
regards,
George
|
|
|
|
|
1 - yes. It finds changes made to assemblies and configuration files. When a request comes for a page, ASP.NET has to compile it which will make it slow for the first time (Assuming you are not using precompiled deployment).
2 - This can't be predicted. It completely depends upon your code.
|
|
|
|
|
Thanks Navaneeth,
1.
I think if we do online upgrade, we just make the response slow since ASP.Net needs to compile it. But if we shutdown web site, no response could be served. And at the first time, ASP.Net also needs to compile. So, why not select online upgrade solution?
2.
I am confused about what do you mean ASP.Net needs to compile. I have compiled/build the binary code into DLL (as web handler bianry file), why ASP.Net needs to compile again?
regards,
George
|
|
|
|
|
1 - You are repeating the same question. I will try to explain once more. Assume you have 100 users online when doing a site upgrade. All 100 will have some data on their session or whatever it is. When you upgrade the files, ASP.NET recycles the worker process and all the above said sessions will be lost. If your application is not written defensively, it will throw error user in many places.
This is bad and user is not aware of the upgrade. So to prevent all these, a usual practice is to take the site down when upgrading. This method also clears the sessions and other data, but user is informed so that he won't be in a confusion that what's wrong with the application.
2 - If your site is precompiled, ASP.NET will not compile it again. But still you will notice a performance degrade when requesting the page for the first time.
|
|
|
|