Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 16, 2012 11:33 AM by mclazarini
May 04, 2012 01:17 AM|LINK
I´m using a Dialog Box in my Web MAtrix Site that contains a text field which the user can insert whatever he wants to be recorded in the database.
So far so good, I have wrote the code correctly.
The problem is when he press the "send" button I don´t know how to get this new data. I have two options:
a-) Refreshing the page after recording;
b-) Geting the data and inserting without refreshing it - (the best option).
Any Suggestions? I looked for it in the MSN library but didn´t find anything.
db.Execute("INSERT INTO Links (Linkadd, CategoryID2, LinkUser ) VALUES (@0,@1,@2)", link, categoriesna, WebSecurity.CurrentUserId);
Refresh();!? / Response
May 04, 2012 04:48 AM|LINK
See if anything in this article helps you with your question: http://www.mikesdotnetting.com/Article/155/WebMatrix-And-jQuery-Forms
May 04, 2012 12:03 PM|LINK
their is not a insert problem, once you click on send button your page will again reload so you have to control it by ajax update panel it will update only u r area where u r message is getting inserted one more thing in send button click event you can
check where end of event u bind data to grid view.
May 04, 2012 08:19 PM|LINK
Thanks a lot... I´ll check it out this weekend. I was thinking that it would be easier to solve.
May 15, 2012 01:24 AM|LINK
I have read the Mike´s article and tried to implement it.
Evething went fine until I tryed to add some new content. So, I tried to download the MiKe´s example and I got the same problem, which is...
[object XMLHttpRequest] - Everytime I try to post the data.
I´m using the Web Matrix Beta Version --- Isn´t it compatible with this version???
Thanks in advance.
May 15, 2012 10:49 AM|LINK
Actually my problem is quite simple.
I have an input text field which the user can insert an image address. So, I nedd to record it into the database and show it in the same page without reload. If the user insert another image the second one need to be showed with the first and so on.
Recording in database is Ok but I just don´t know where to find an app in Ajax (never worked with ) that I can customize or a function or helper in Web Matrix which could help me.
Anyone have any suggestion?
May 16, 2012 05:37 AM|LINK
The sample I provided shows how to do something similar. You need to spend a bit of time understanding how AJAX works properly. There are thousands of articles around that explain the basics. Once you understand those, what you want to do is pretty simple.
May 16, 2012 11:33 AM|LINK
Thanks for you attention whit a newbie.