code-behind

Get confirm-box value via code-behind at C#

若如初见. 提交于 2019-12-25 11:51:28
问题 I want to get the value from side to confirm aspx bool type=false; type= ClientScript.RegisterStartupScript(typeof(Page), "exampleScript", "confirm('are you confirm?')", true); if(type){ ... } How do I get the value of? 回答1: Doesn't sound like best of the approach (I mean you could show pop-up client side)... However, if you want to accomplish this... You have have a hidden asp:Button on your aspx and attach a event handler to it and write the code that you want to have executed upon clicking

How to get the values of a ID column in a jqGrid from VB.NET code behind page?

落爺英雄遲暮 提交于 2019-12-25 05:31:53
问题 My .ascx page has two jqGrids $(document).ready(function () { var searchText = ""; $("#cclist").jqGrid({ //url: ResolveUrl() + '/CC_DoctorList', datatype: 'local', // postData: { "CaseNo": CaseNo }, mtype: 'POST', ajaxGridOptions: { contentType: 'application/json; charset=utf-8' }, serializeGridData: function (jsondata) { return JSON.stringify(jsondata); }, jsonReader: { repeatitems: false, root: "d.rows", page: "d.page", total: "d.total", records: "d.records" }, colNames: ['Remove',

How to get the values of a ID column in a jqGrid from VB.NET code behind page?

心已入冬 提交于 2019-12-25 05:31:25
问题 My .ascx page has two jqGrids $(document).ready(function () { var searchText = ""; $("#cclist").jqGrid({ //url: ResolveUrl() + '/CC_DoctorList', datatype: 'local', // postData: { "CaseNo": CaseNo }, mtype: 'POST', ajaxGridOptions: { contentType: 'application/json; charset=utf-8' }, serializeGridData: function (jsondata) { return JSON.stringify(jsondata); }, jsonReader: { repeatitems: false, root: "d.rows", page: "d.page", total: "d.total", records: "d.records" }, colNames: ['Remove',

if statement to control input text in code behind [closed]

两盒软妹~` 提交于 2019-12-25 01:16:30
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 8 years ago . I need to create if statement to control input text for example; when user type blue, send message from code behind for next user in order to notify him or her blue is already typed. Is there any solution: if

From asp.net code behind (aspx.cs) on the server how can I determine if Silverlight is installed on the client?

只谈情不闲聊 提交于 2019-12-24 23:23:24
问题 IIS 6.0 hosting ASP.NET 3.5. From the Visual Studio 2008 aspx code behind (aspx.cs) running on the server I need to determine if Silverlight is installed on the client and if so which version. I know from Java on the client this can be done. That is not what I need. I know I can put in a control that will render if Silverlight is installed. That is not what I need. 回答1: It seems Silverlight does not add any information to the user-agent string that is sent to the server with every request (by

Make RequiredFieldValidator in aspx.cs (code behind) asp.net

流过昼夜 提交于 2019-12-24 14:26:59
问题 I have a TextBox where i add a number and at a buttonclick i create new textboxes depending on what number i put in my first TextBox. For example i put 5 in the TextBox and press button i get 5 new textboxes on my page. Now im trying to make a RequiredFieldValidator on all of this textboxes thats created but i can't get it to work. I have another button that makes an insert to my db and this values from all the new textboxes are required. Can someone take a look at my code to see if im on the

How Secure is string sysPath = “C:/Inetpub/vhosts/…”

梦想与她 提交于 2019-12-24 12:20:08
问题 I have a little more detailed question, FileUpload from Subdomain to Folder of Main Domain, which I kinda solved, but I'm just not sure how secure my solution is. In short, a logged in person can upload files, but they're on subdomain and the files are getting stored in the parent domain's folders. So I'm using: string sysPath = "C:/Inetpub/vhosts/domain.com/httpdocs/Uploads/Files/" Is the acceptable? 回答1: I'm assuming you're asking if these files are safe from unauthorized access. The answer

Calling Javascript function from code behind ASP.NET

我们两清 提交于 2019-12-24 10:47:27
问题 I'm attempting to call a javascript method in its own file from code behind on a button click. aspx file protected void Next_Click(object sender, EventArgs e) { if (hidden.Value == "") { Response.Write(@"<script language='javascript'>drawImage();</script>"); } } js file function drawImage() { context.drawImage(video, 0, 0, 320, 240); var imgBase = canvas.toDataURL('image/jpeg'); document.getElementById("hidden").value = imgBase; } The problem is that this wont call the draw image method, i

How do i add a second code behind file to a xaml file?

懵懂的女人 提交于 2019-12-24 06:41:14
问题 In visual studio i want to add a second code behind file to a xaml window (my main form). i know i can have another (or as many) files that form partial parts of a class, and if they are in the same project they will be included, but can i make more than one file sit in the expander (in the solution explorer) when i expand the xaml file to see its code behind? 回答1: Your project file (.csproj for example) is actually XML. Open the .csproj file from the open file dialog, and you will see how it

How do i add a second code behind file to a xaml file?

两盒软妹~` 提交于 2019-12-24 06:40:19
问题 In visual studio i want to add a second code behind file to a xaml window (my main form). i know i can have another (or as many) files that form partial parts of a class, and if they are in the same project they will be included, but can i make more than one file sit in the expander (in the solution explorer) when i expand the xaml file to see its code behind? 回答1: Your project file (.csproj for example) is actually XML. Open the .csproj file from the open file dialog, and you will see how it