|
So TxtValue is dynamic?
If so, it will never post back to the server, seriously.
You would have to transmit the data via JQUERY Ajax and JSON to a web service, which updates the database.
Or stuff the data in a textbox that comes off the server, and delimit the values to post it back.
Or write a json format text stream to the textbox, and decipher it on the server side.
Feel free to ask for any clarification
|
|
|
|
|
I'm currently designing a page using ASP.NET and JQuery which is very similar to an order form. The page has two ASP.NET Panels; the first one contains ASP.NET controls for some general information. These controls all have validators associated with them, all part of the validation group "vgRequest", along with a validation summary control which is also part of the vgRequest group.
The second Panel contains only HTML text boxes (<input /> ) and two buttons (<button />) . When one of the buttons is clicked, it is supposed to call a JQuery function, however the HTML button is causes the ASP.NET validators to run.
I do not want this to happen as at the very end of the page there is another ASP.NET button which should cause the validation to run. I have tried setting the EnableClientScript property on the validation summary control to False but this didn't help. I've also tried searching on Google but everything I've come across talks about using <asp:Button /> controls.
Is there anyway to prevent normal HTML controls from causes the ASP.NET validators to run? I know I could use <asp:Button /> and set the CausesValidation property to False, but I don't know if this is an option. I'm using the Knockout library and the button I currently have is <button runat="server" data-bind='click: addLine'>Add Line</button> but I haven't figured out a way to add the data-bind='click: addLine' to an ASP.NET button (I have tried OnClickClient='addLine' but this didn't work either.
Any suggestions or information that can help resolve this issue would be greatly appreciated.
Thank You
A black hole is where God tried to divide by zero.
There are 10 kinds of people in the world; those who understand binary and those who don't.
|
|
|
|
|
It sounds like your addLine function isn't preventing the default click action. As a result, the button will submit the form, which will cause the validators to run on the server.
According to the Knockout documentation[^], if your addLine method returns true , the default click action will run.
Adding the binding attribute to an ASP.NET button should be as simple as:
<asp:Button runat="server"
CausesValidation="false"
Text="Add Line"
data-bind="click: addLine"
/>
Any attributes which don't map to properties on the control will be passed through unchanged.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Just a stab in the dark here.
onClientClick="jquery_validate(); return false;"
The return false cancels the button click event, which in turn cancels the validation.
[edit]
Or you use a non-button like an image or span element, and bind the click in the jquery validator or the document.ready, so it doesn't act like a HTML button, but fires the event. I think you can fabricate a button using span and some css.
|
|
|
|
|
Hi,
I've a quick question -
I'm having 3 pages - 1) Master Page, 2) Header Page(UserControl) 3)Home Page
I'm using header user control as header tag in master page, and then home page is called from master page as well.
I'm not using header user control page in home page. but my requirement is to call a function in header page from Home page on a button click. How can I do this ?
Need help on this please
|
|
|
|
|
- Make sure the function in the header UserControl is public;
- Add a public property to the code-behind for your master page to expose the header UserControl, using the type defined in the UserControl's code-behind;
- Add the
@MasterType directive[^] to your home page to specify the type of the master page; - You will then be able to access the new property from the home page's
Master property, and from that you will be able to access the function:
Master.HeaderControl.YourFunction()
How to: Reference ASP.NET Master Page Content [^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I do't understand clearly if you can explain more or try post your code.
but maybe you can try use the public word for your function
|
|
|
|
|
Hello Everyone
How to make a Video calling pop up (eg. Skype)if user calls to another user need show a popup window Accept/Deny
Very Urjent
Kindly do the needful
|
|
|
|
|
|
There is a lot of code required to do this and there are likely some samples online; however, we can't just hand you all the code.
What we can do is answer specific questions once you get started and then get stuck on something specific.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hello I am new to linq i want to get a data from the store procedure want to show in page load
Kindly do the needfull very urjent
modified 7-Feb-15 16:09pm.
|
|
|
|
|
Member 11084469 wrote: i want to get a data from the store procedure want to show in page load
You have our permission. Go ahead.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Member 11084469 wrote: very urjent No, it's not urgent at all.
|
|
|
|
|
We can't give you the code for many reasons, some of which are that we don't know what your stored procedure is named, what your classes are named or any of your variables.
However, I can tell you that this is one of the most basic things to do with Linq so if you just google c# linq examples, you'll find many samples you can then use to see how to do what you want.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
hi,I have a ms word,s templete form and i want export data from Textbox and rich Textbox to special area in Msword,s Templete Form,please help me!
|
|
|
|
|
Where are you stuck?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Dear Sir, I am Danish Habib and i get struck with an issue and i have placed my question in many forums but no one still replied to me which is consider as best solution ,The problem statement is below
I have a web application in which i have users and user have the following information (userid,name,email,Passowrd,SecurityQuestion,SecurityAnswer,District,Tehsil,UC,Villages)
So the business rules are as follows
1-One user can have one or more districts
2-One user can have no or many tehsils.
3-One user have have no or many ucs.
4-One user can have no or many villages
these are cascade in nature like that
District------>populates------->Tehsisl
Tehsils-------->Populates ------->UCs
UCs-------------->populates------Villages
So i have made four tables one for basic infromation of user like (userid(P),name,email,password,securityquestion,securityanswer)
4 more tables are DistrictVSUsers(Userid(F),DistrictID(P),DistrictName)
TehsilsVsUser(Userid(F),Tehsil(ID),TehsilName,DIstrictID(F))
UCsVsUser(Userid(F),UCID,UCNAME,TEHSILID(F))
VillageVsUSers(USerid(F),VillageID,Villagename,UCID(F))
These are five table nor four ...
These table are for saving purposes for showing the cascaded records i have used checkboxlist on selection of district checkboxlist the tehsil checkboxlist will populats and on selection of tehsil checkxboxlist the uc checkboxlist populats and on selection of uc checkboxlist the villages checkboxlist item populates ...so this working fine ..
Now For saving the data I am using the loop first loop goes for district and save all the district then the next loop for tehsil and then the next for UC and then the next for Villages .................
So I have assigned one user with 71 villages and now when on edit i want to show the check box checked whose values are present into the database i am getting 71 rows using data reader
"SELECT U.UserId,U.[Address],U.City,u.Country,UT.TehsilId,UC.UCID ,UC.UCName,UV.VillageId ,UV.VillageName ,UT.TehsilName,U.DistrictId,UD.DistrictName ,UD.DistrictId ,UD.UserId,U.FullName,U.IPAddress,U.IsActive,U.IsAdmin,U.IsPasswordReset,U.IsReportable,U.IsVisible,U.CreateDate ,U.Mobile,U.Password,U.ReporintPerson,U.SecurityAnswer,U.SecurityQuestion ,U.UserId,U.Email,U.UserTypes FROM Users U
INNER JOIN UserDistricts UD ON UD.UserId=U.UserId AND UD.DistrictId=U.DistrictId
INNER JOIN UserTehsils UT ON UT.UserID=U.UserId AND UT.DistrictId=UD.DistrictId
INNER JOIN UserUcs UC ON UC.UserID=U.UserId AND UC.TehsilId=UT.TehsilId
INNER JOIN UserVillages UV ON UV.UserId=U.UserId AND UV.UcID=UC.UCID
WHERE U.UserId =26
"
Now i loop from the first row and get the district id which is comming then pass that district id to a method which find all tehsils associated with that district and then select the tehsil whose value comming with datareader first row and pass that tehsil to a mthod which find all ucs assocaited with that and then select the selected and then pass the Uc id to a method to find associated villages and then checked if the first row having that value this all process is done for all rows if i have 70 rows and 70 time this process goes and makes the application very slow please assist me and give me your email to show you the code
|
|
|
|
|
The reason you are not getting any answers is that you are not asking your question in a way that makes it easy to understand. You are also not even asking any real question at all. You are simply stating a bunch of facts... And then saying "It's slow, help me".
You will get much better results if you rewrite your question with very specific questions, and provide only the code necessary to recreate the problem. Ask questions that can be answered explicitly, not open ended questions.
We don't know what to do with "It's slow, please help me".
--
Where are we going? And why am I in this handbasket?
|
|
|
|
|
It is very hard to understand what your actual question is. I'd suggest simplifying this down to just the relevant parts and ask a specific question.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
I have a asp.net web page developed using C#.Net. there are several GridView controls. I want to avoid displaying the date "01/01/1900" which is a default date in database tables in those GridView columns.
In DataRowBound event i can replace "01/01/1900" with "" (blank). When there are lot, is there an easy way to replce "01/01/1900" with "" at run time
|
|
|
|
|
|
Hi folks ,
we are trying to publish our website to production server.which includes changes to global.asax file's application_start.which registers a bundle to load/compress js/css files.it works fine with local solution.
But when we deploy same application to server.all bundled resources are not loading after login to the page.i suspect the problem with global.asax as this file makes a call to the bundle class to register bundled resources.
When i look at the global.asax file.Global.asax file is present in root directory of publised folder.and global.dll files are present in bin folder also.
but after deploying to the server global.asax file is not updationg in deployment server.
due this issue i am not able deploy it to the server.
Any suggestions please..
-- modified 5-Feb-15 4:28am.
|
|
|
|
|
Your global.asax file won't update because it hasn't changed. This file only has a small amount of metatdata in it to point to the DLL. If you right click on the global.asax in your solution explorer, choose "view markup" and you will see only a single line of code that looks like this:
<%@ Application Codebehind="Global.asax.cs" Inherits="WebApplication.Application" Language="C#" %>
Since this file doesn't change, it won't be updated when you deploy. As such, this isn't the cause of your problems.
More than likely, the cause is something else, but since you haven't included more details about your problem we can't really help more.
--
Where are we going? And why am I in this handbasket?
|
|
|
|
|
I have created a global.asax file not gloabal.asax.cs file.it works well with IIS 7 but not on IIS 6 Version.
|
|
|
|
|