Click here to Skip to main content
15,064,293 members

Comments by Maxdd 7 (Top 181 by date)

Maxdd 7 3-Apr-12 14:34pm View
   
Year and a half later, those sticky notes are already done and outdated ;)
Maxdd 7 12-Jan-12 8:33am View
   
Deleted
The question is not readable.
Maxdd 7 10-Jan-12 16:09pm View
   
Yes, but the taking into account there is a "action request enable" to enable bluetooth, there is also a way to enable programatically BT without user interaction (using .enable), I was wondering if it possible to do the same with discoverable timeout.
Maxdd 7 10-Jan-12 14:41pm View
   
I know that sample very well - every time you do that discoverableIntent, that prompts the user for confirmation - that is what I want to avoid.
Maxdd 7 14-Sep-11 10:23am View
   
I get my exception on the creation of the listener. It's like if the Checkbox was not found by the listener - so whatever I put "inside" the listener is not relevant since it's recognizing correctly.
Maxdd 7 14-Sep-11 9:15am View
   
I tried that but has some errors so for someone who obviously don't know what's doing is not easy. However, I don't believe that is necessary because the previous solution (with that code) already worked, but to another layout. Please see me edited question again!
Maxdd 7 13-Sep-11 18:28pm View
   
@TorstenHn, never mind I was not thinking straight. can you please read my edited question?
Maxdd 7 13-Sep-11 18:27pm View
   
Deleted
@TorstenHn, never mind I was not thinking straight. can you please read my edited question?
Maxdd 7 13-Sep-11 17:24pm View
   
Deleted
Never mind I was not thinking straight. I understand now, and was able to place the handler in the "right place", however it was not working and I finally understood why. If you are curious, see my own answer, hope there's no problem.
Maxdd 7 13-Sep-11 15:35pm View
   
Deleted
Never mind, I was not thinking straight. Okay, I understand now the situation. I couldn't however, get the handler to work. Can you please check my edited question (edited in the last) and see what I'm doing wrong?
Maxdd 7 13-Sep-11 11:58am View
   
I'm sorry, I really thought that I previously asked at another forum. But I don't understand that solution, why should I store a boolean value? Because what I want is to store all options in an array.
Maxdd 7 12-Sep-11 14:35pm View
   
Unfortunately that thread does not help because for me, list.getCheckedItemPositions(); is always null. However list itself is not, it has all the elements...
Maxdd 7 18-Jul-11 8:14am View
   
Much easier :)
Maxdd 7 15-Jul-11 11:45am View
   
Thanks for helping.
Maxdd 7 15-Jul-11 11:45am View
   
So obvious, thank you very much.
Maxdd 7 15-Jul-11 11:40am View
   
It works. Thank you very much.
Maxdd 7 15-Jul-11 9:08am View
   
Yes I supposed that, however the problem is the jstring is sent from a PHP web service

$regs[] = array('name' => $registo["Name"]);
return json_encode($regs);

See my updated question for more details...

Any change on this situation to make this work? :)
Maxdd 7 14-Jul-11 13:01pm View
   
Edited question.
Maxdd 7 13-Jul-11 19:27pm View
   
Updated my question.
Maxdd 7 13-Jul-11 18:41pm View
   
Deleted
If you say so, those tutorials always use the following variables:

private static final String NAMESPACE = "http://localhost/www/ws" ;
private static final String METHOD_NAME = "verTexto";
private static final String SOAP_ACTION =
private static final String URL = "http://localhost/www/webs.php";

I dont know how to use soap_action, or how to adapt the web service to it.
Maxdd 7 12-Jul-11 13:02pm View
   
You are completely right, solved using meta tags.

<meta property="og:title" content="Android Apps" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://apkitchen.voku-online.de/teste.php" />
<meta property="og:image" content="" />
<meta property="og:site_name" content="apKitchen" />
<meta property="fb:admins" content="100000473064054" />

Thanks for the tip!
Maxdd 7 5-Jul-11 15:22pm View
   
I just found out that was not the cause.

After using $_FILES['uploaded']['error'] this output 1 value, which means that the file is bigger than defined on the php.ini directive - the one I dont have access.
Maxdd 7 25-Jun-11 8:22am View
   
It works, but witdh is not fixed, it need the table-layout:fixed the same.
Maxdd 7 25-Jun-11 8:21am View
   
Deleted
Tried that, didn't worked.
Maxdd 7 22-Jun-11 8:49am View
   
I'm using PHP Mailer with that code ;) Also, the code works with another configuration (another smtp server), only for Gmail does not seem to work.
Maxdd 7 21-Jun-11 21:48pm View
   
I have openssl enabled. So what now ?
Maxdd 7 13-Jun-11 9:32am View
   
Solved with Runtime.getRuntime().exec
Maxdd 7 13-Jun-11 9:18am View
   
I get that error "“Cannot make a static reference to the non-static method” Any idea ?
Maxdd 7 13-Jun-11 7:33am View
   
Didn't tested but that should work, thank you very much :)
Maxdd 7 13-Jun-11 7:32am View
   
I know that, it's I forgot to place the "java -jar" in my example but that is kind of obvious. What I want e to place it on the code, instead executing with the command line.
Maxdd 7 1-Jun-11 16:23pm View
   
Updated my answer. I just asked because I supposed there was a method to do that (lately I found there was a php method for everything :)

I'm supposing now I was wrong, so please consider my question "solved".
Maxdd 7 31-May-11 13:22pm View
   
All information I found it was referring to mysqli, but I don't use that.
Maxdd 7 31-May-11 13:12pm View
   
Unfortunately not :(

Those two procs just have two SELECT statements:

SELECT Count(Descricao) FROM Inventario WHERE CelaID IS NULL AND Descricao = 'Cama' AND pID = prID;

I tried the mysql_free_result but don't work :( Check out my updated answer..

" It can also happen if you try to execute two queries that return data without calling mysql_use_result() or mysql_store_result() in between"

PHP5 does not have any of those ..
Maxdd 7 25-May-11 5:39am View
   
Thanks Manfred. I now use Agility pack it works perfect for my needs. Thank you very much!
Maxdd 7 23-May-11 18:51pm View
   
Sorry, updated question. However I can take for granted which version is, because I extract those documents from webpages. But for a matter of probability, almost all should be word documents.
Maxdd 7 23-May-11 12:13pm View
   
Yes it's true, thank you both.
Maxdd 7 23-May-11 12:12pm View
   
Thank you!
Maxdd 7 23-May-11 11:36am View
   
It was just for testing :) Thanks.
Maxdd 7 23-May-11 11:36am View
   
I already tried that :)
Maxdd 7 15-May-11 14:15pm View
   
Okay, so that makes sense, thanks :)
Maxdd 7 15-May-11 12:16pm View
   
I'm going to update the question.
Maxdd 7 15-May-11 11:23am View
   
I don't want to use mysql replication for optimization, my point is to use it to fault tolerance.
Maxdd 7 15-May-11 11:21am View
   
I'm not sure you understood my question. The situation is: in case of master fails, even if I redirect to slave DB, when master is available how to sinc those DBs ?
Maxdd 7 13-May-11 12:08pm View
   
Perfect. Thank you very much.
Maxdd 7 6-May-11 8:10am View
   
It worked perfect, thanks.
Maxdd 7 6-May-11 8:03am View
   
Deleted
For some reason my script became "unresponsive" with that function.
Maxdd 7 22-Apr-11 23:52pm View
   
I didn't tested, but that doesn't matter: it makes all logic now. Thank you very much.
Maxdd 7 22-Apr-11 20:51pm View
   
I'm sorry, yes maybe it's confusing my question, much because the name of the fields I used.

I see your answer but I think does not help because if I do SELECT @idc..., I need to do SELECT idContacto2 (to extract from that specific field). I edited my question to be more clear, maybe you can take a look?
Maxdd 7 22-Apr-11 11:01am View
   
Let's suppose that the DELETE statements are not here, how would be the right sintaxe to SELECT and then UPDATE?
Maxdd 7 22-Apr-11 10:59am View
   
No, idContacto2 where id is in another row :)

The problem is I'm not passing the variable the right way, I can't get the idc value to work.
Maxdd 7 21-Apr-11 16:19pm View
   
Accepted! Thank you very much I didnt know that :)
Maxdd 7 21-Apr-11 16:19pm View
   
It's not possible because one of the fields it's primary key.
Maxdd 7 21-Apr-11 16:17pm View
   
Deleted
It's not possible because one of the fields it's primary key.

CREATE Table IF NOT EXISTS Contactos(
iContacto INT AUTO_INCREMENT,
Nome VARCHAR(250) NOT NULL,
Sexo CHAR(1) NOT NULL,
Grau VARCHAR(30),
Telefone VARCHAR(10),
TelefoneA VARCHAR(10),
Email VARCHAR(40) DEFAULT '-',
Date VARCHAR(10),
Foto CHAR(1) DEFAULT '-',
nRelacoes INT DEFAULT 0,
UsersID INT NOT NULL,
PRIMARY KEY(iContacto),
FOREIGN KEY(UsersID) REFERENCES Utilizadores(UsersID))ENGINE=MyISAM DEFAULT CHARSET=latin1;
Maxdd 7 21-Apr-11 16:16pm View
   
Of course. I did that. I didnt said that because I said mysql_query with hardcoded SQL statement worked, but of course I did echo $_GET['nome'].$_GET['uid'];
Maxdd 7 19-Apr-11 13:20pm View
   
I had no idea, thank very much :) That solved the problem :)
Maxdd 7 18-Apr-11 11:27am View
   
With .png images happens the same. Tested on another computer, last Chrome version, IE8 and Firefox 4. Happens only with Firefox and with the last version it's even worse picture quality.

You can look at it directly :) http://apkitchen.pt.vu (i hope not desrespecting any rule posting here this website - it's just for comparison)
Maxdd 7 18-Apr-11 11:11am View
   
Thanks again for the bottom atribute :)

The code is this:
<div style="position: fixed; left: 20px; bottom:0px;">
a href="#" önclick="window.scrollTo(0,0); return false">
<img src="images/down.jpg" alt="Go to bottom" BORDER=0 width="40"
height="40" />
</div>

And the images here (firefox on the left)
http://img62.imageshack.us/img62/8559/screenshotvxt.png

What do you think?
Maxdd 7 17-Apr-11 10:06am View
   
By the way for some reason I'm placing images on those divs and on firefox they appear with less resolution than on Chrome. Is any way to avoid that ?
Maxdd 7 17-Apr-11 10:03am View
   
I was using

#fixed { position: fixed; left: 40px; width: 40px; height: 40px; }

but in firefox it was off limits. With top=90% I have it where I want. Thanks again for the excelent answer.
Maxdd 7 16-Apr-11 17:34pm View
   
Wow... those div's do not appear on Firefox 3.6. There's any trick for that?
Maxdd 7 16-Apr-11 17:32pm View
   
It's perfect, thanks!
Maxdd 7 15-Apr-11 8:06am View
   
That's what I was trying to do with ";expires=Thu, 01-Jan-1970 00:00:01 GMT"; Thanks!
Maxdd 7 13-Apr-11 11:43am View
   
I probably can't do it because the objective of XHR is execute things on the server, not executed by the browser.
Maxdd 7 13-Apr-11 11:41am View
   
Well, the question is: can I do those things that way? Because if yes, it's not working, I'm not being redirected to something.com. (that's not what I want to do of course, but it's the same principle)
Maxdd 7 27-Mar-11 17:58pm View
   
With would be easier? I'm editing my question now, open to all kind of suggestions :)
Maxdd 7 27-Mar-11 11:54am View
   
Anyone?
Maxdd 7 22-Mar-11 11:07am View
   
Nobody knows ?
Maxdd 7 14-Mar-11 0:19am View
   
That was my "second alternative". I just becoming curious about another way, you guys always remember a tricky solution :)
Maxdd 7 11-Mar-11 14:55pm View
   
Thanks for your help.

Unfortunately my little project it's in PHP.
Maxdd 7 9-Mar-11 12:26pm View
   
But the way, how would you move observable to server-side ?
Maxdd 7 9-Mar-11 9:42am View
   
Thank you very much, I'll take a look.
Maxdd 7 7-Mar-11 10:19am View
   
Excelent answer! Thank you very much.

Just for curious, how could use the same using DOM ?
Maxdd 7 3-Mar-11 19:38pm View
   
Yes I'm using XMLHttpRequest for now.

Unfortunately not as agile as Page Methods, but it will have to do the trick for now.
Maxdd 7 2-Mar-11 9:15am View
   
Thanks the answer posted by Amit.
Maxdd 7 2-Mar-11 8:00am View
   
I found VSPrj2Make but looks kind of old.
Maxdd 7 2-Mar-11 7:58am View
   
I mean to run tomcat on Windows (I said that I want to run VS).
Maxdd 7 2-Mar-11 7:57am View
   
Yes that was my conclusion too.

By the way, for integration with VS 2010 do you know if the (paid) mono tools
http://mono-tools.com/
are the only solution?
Maxdd 7 2-Mar-11 7:42am View
   
Unfortunaty I guess that works for Apache, but not for Tomcat (tomcat has different configurations, does not have even the httpd.conf)
Maxdd 7 1-Mar-11 9:26am View
   
Anyway if anyone can reply about my previous question I appreciate :)
Maxdd 7 28-Feb-11 6:49am View
   
Thank you very much for helping.

I've deleted the asp content control because I was getting error's with master page on information so I suppose that's because I'm not using .NET 4.0. It works :)

A question: another solution was using Page Methods:

Making an ajax call, PageMethods.writeFile(...) and then on writeFile function do the writing I made of "Default2.aspx".

In your opinion, what should be better?
Maxdd 7 28-Feb-11 6:20am View
   
Thanks for the correction :)
Maxdd 7 27-Feb-11 21:57pm View
   
I placed:

var content = "xpto";
var url = "info.xml";
var data = "file=" + url + "&content=" + content;
// var data = "dados";
xmlhttp.open("POST", "test.aspx", true);
//xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlhttp.setRequestHeader("Content-Type", "text/plain");
xmlhttp.send(data);

and then on test.aspx.cs page load

string xpto = Page.Request.QueryString["texto"];

// Create a new file in C:\\ dir
XmlTextWriter textWriter = new XmlTextWriter("d:\\myXmFile.xml", null);
// Opens the document
textWriter.WriteStartDocument();
// Write comments
textWriter.WriteComment(xpto);

....

However still cant write what I input to XML :(
Maxdd 7 27-Feb-11 21:40pm View
   
Deleted
I'm posting to another .aspx page an on page_load I have XML writing code, but dont work nor I dont know how to pass the data.

Really appreciate any help.
Maxdd 7 27-Feb-11 18:25pm View
   
Okay, but how should I process the data to write to XML ?
Maxdd 7 27-Feb-11 14:08pm View
   
Thanks, I'll take a look at the info you provide me.
Maxdd 7 27-Feb-11 13:41pm View
   
"Two webservers for the same webpage", I mean two webservers working together. (not what I really want)
Maxdd 7 27-Feb-11 13:40pm View
   
From what I see that is to share resources: two webservers for the same webpage.

What I need is if one webserver goes down, the other one assume 100% all processes.
Maxdd 7 26-Feb-11 13:43pm View
   
Oops my bad, I thought callServer with was a standard def for some postback action.

Just a question, there is a way to call multiple functions at the same period of time ?
Maxdd 7 24-Feb-11 11:30am View
   
I've been here for hours studying Ajax and XMLHttpRequest, but I still dont understand how can I connect specifically two users in a room.
Maxdd 7 24-Feb-11 11:27am View
   
I agree with you, but I still dont know how to do the following:

- When user log in, choose start game and open a new windows while see the "waiting to player" message.

- Other user sees the "room" - "join" the game - and my problem is: specifically, how do I connect one user with the other?
Maxdd 7 23-Feb-11 12:55pm View
   
I appreciate your answer, but all your links go to "offline" multiplayer (not web based).

I'm studying this tutorial
http://www.junnark.com/Articles/Build-a-Web-Chat-Application-Using-ASP-Net-LINQ-and-AJAX-CS.aspx

One more time, I appreciate more suggestions.
Maxdd 7 14-Jan-11 12:27pm View
   
helps yes :)

unfortunately I isntalled everyting by the readme (all's ok) but when I compile the test script I get undefined references to phread. Any ideas ?
Maxdd 7 14-Jan-11 12:26pm View
   
I'll try to make all xml file with simple fputs and see if Firefox accepts the xml
Maxdd 7 14-Jan-11 12:26pm View
   
yes the "pre" solution didnt worked.

yes with the ' it works (sorry my mistake)
Maxdd 7 11-Jan-11 11:21am View
   
Can you please clarify?
Maxdd 7 11-Jan-11 11:20am View
   
Unfortunately not, because as I said, is dll are integrated with VS. Anyway some hours ago I tested and it wont work either using the dll's.
Maxdd 7 7-Jan-11 9:10am View
   
Let us know what you've done so far.
Maxdd 7 5-Jan-11 22:11pm View
   
Yes I understand you. I agree with I just didnt like how you said that.

Thanks for your gesture, my project its almost finished so I hope its not needed.
Maxdd 7 5-Jan-11 21:37pm View
   
That's not true, You referenced me and my stumbling many times. But it's ok Mark.

Honestly I didnt liked what you said, altough I really appreciate your help and patient.
Maxdd 7 5-Jan-11 20:52pm View
   
You seriously have to stop "talking" as you know who you are talking about.

If you think I deserve to be helped, and you want to help, help. If you dont, dont answer, you dont help anything nor anyone with those kind of comments. For a respected member as you, it's sad see those kind of comments.

On topic, yes it was a stupid question. I didnt know that JS could hold "global variables". Probably that is one page five on that book you told me to read
Maxdd 7 5-Jan-11 20:52pm View
   
Deleted
If you think I deserve to be helped, and you want to help, help. If you dont, dont answer, you dont help anything nor anyone with those kind of comments. For a respected member as you, it's sad see those kind of comments.

On topic, yes it was a stupid question. I didnt know that JS could hold "global variables". Probably that is one page five on that book you told me to read
Maxdd 7 5-Jan-11 20:51pm View
   
Deleted
You seriously have to stop "talking" as you know who you are talking about.

If you thing I deserve be helped, and you want to help, help. If you dont, dont answer, you dont help anything nor anyone with those kind of comments. For a respected member as you, it's sad see those kind of comments.

On topic, yes it was a stupid question. I didnt know that JS could hold "global variables". Probably that is one page five on that book you told me to read.
Maxdd 7 5-Jan-11 20:45pm View
   
Deleted
Anyway, thanks.
Maxdd 7 5-Jan-11 20:44pm View
   
Deleted
You seriously have to stop "talking" as you know who you are talking about.

If you want to help, help, if you dont, dont do anything.
Maxdd 7 5-Jan-11 20:41pm View
   
Deleted
I honestly dont know how to do that because once result function its executed

// 'cor' variable to pass somewhere
PageMethods.verID(result);

and verID returns a value,
function result(id)

how could I pass the variable ?
Maxdd 7 5-Jan-11 20:22pm View
   
I like my mess :), but I changed because I'm about to make a question that would be confusing if I didnt do it.

On topic, I'm not understanding your answer. The value passed "in to" ? English is not my native language, so I really cant understand that.

Can you please clarify ?
Maxdd 7 5-Jan-11 20:07pm View
   
Maybe using cookies ?

Or there is a basic solution to pass that variable ?
Maxdd 7 5-Jan-11 19:47pm View
   
Perfect! thanks.
Maxdd 7 3-Jan-11 16:41pm View
   
By the way, I suppose your solution involve a class and/or a connectDB.cs file to import :)
Maxdd 7 3-Jan-11 16:39pm View
   
Yes, but I think I'm now stumbling very less than before :)

I picked a book already. Altough I had to read it in time record because I have a deadline to what. For now I will finish what i'm doing (i'm in debugging and optimizing now phases now), next time I'll for sure remember to pick up a book previously.

For now, I'm doing the best I can with the time I have.
Maxdd 7 30-Dec-10 14:38pm View
   
Have you found the Google Tasks API ?

I think that dont exist.
Maxdd 7 28-Dec-10 10:34am View
   
Well, that's what am I using now.

In your answer, you referred me this link
http://msdn.microsoft.com/en-us/library/ms227673.aspx

And that's what I'm using.

Right ?
Maxdd 7 28-Dec-10 10:12am View
   
Unfortunately no, because the problem with at the handler.

I'm trying this way:

string filePath = context.Request.FilePath;
string absolute = context.Request.Url.AbsoluteUri;

context.Response.Write("path: " + filePath + " abs: " + absolute);

try
{

string fileExtension =
VirtualPathUtility.GetExtension(filePath);
if (fileExtension.Equals(".css") && (filePath == absolute))
context.Response.Redirect("nothing.aspx");
}

I get the CSS (the same) and the output:
path: /StickyNotes3.5/css/style.css abs: http://localhost:xx/StickyNotes3.5/css/style.css

So I'm really near.
Maxdd 7 28-Dec-10 0:16am View
   
Thank you very much Mookkan.

First of all, I hope my deleted posts are really being deleted, because I'm posting many posts (i cant edit them so I delete them with the updates).

I solved part of the problem. I was using too many http modules. I realized I just need one - primary web.config. Altough now when I go through absolute path file is "not found" (what I want), my CSS and JS are not being loaded on the page.

I tried to solve the problem through web.config on css and script folders:

<configuration>
<system.web>
<authorization>
<allow users="*"/>
</authorization>



but dont work. Any ideas ?

Looks like ihttp module is blocking all .css and .js files, not the only ones on absolute path..
Maxdd 7 27-Dec-10 23:47pm View
   
Deleted
Thanks Mookkan.

Well actually that example works. I did this way just to test:

if (fileExtension.Equals(".css"))
context.Response.Redirect("nothing.aspx");

it works for /webroot/something.css but not for /webroot/css/something.css.

Any idea why ?
Maxdd 7 27-Dec-10 23:41pm View
   
Deleted
Thanks Mookkan.

Well actually that example works. I did this way just to test:

if (fileExtension.Equals("*.css"))
context.Response.Redirect("nothing.aspx");

else if (fileExtension.Equals(".css")) // works for this one
context.Response.Redirect("nothing.aspx");

else if (fileExtension.Equals("../*.css"))
context.Response.Redirect("nothing.aspx");


else if (fileExtension.Equals("css/style.css")) // DOES NOT WORK!
context.Response.Redirect("nothing.aspx");

else if (fileExtension.Equals("css/*.css"))
context.Response.Redirect("nothing.aspx");

// else if (fileExtension.Equals(".aspx")) works for this one too
// context.Response.Redirect("nothing.aspx");

I dont understand why, it works for .aspx and for /webroot/*.css. But for /webroot/css/*.css does not work. I also hardcoded css/style.css" but dont work.

its a ridiculous problem for sure..
Maxdd 7 27-Dec-10 23:19pm View
   
Deleted
I use .NET 3.5 Website under the IIS present under Windows 7 Ultimate (dont know the version). Dont know if its important.
Maxdd 7 27-Dec-10 23:17pm View
   
Forgot to say (really tired), thanks for your conclusion.
Maxdd 7 27-Dec-10 23:17pm View
   
Deleted
Well,

I'll be honest.

From the info:
http://msdn.microsoft.com/en-us/library/ms227673.aspx

I created helloworldmodule.cs on /app_code, the only thing I did is switch .aspx to .css and <add name="HelloWorldModule" type="HelloWorldModule"/> both web.config.

Also not work...
Maxdd 7 27-Dec-10 23:04pm View
   
No, ProcessRequest(HttpContext context) is not being executed.
Maxdd 7 27-Dec-10 23:02pm View
   
Deleted
Maybe you have those dll or isapi config already did, because I really dont see where's my problem.
Maxdd 7 27-Dec-10 22:59pm View
   
Well I dont understand.

Do you have your MyHttpHandler.cs: on /webroot? that web.config is on CSS folder ?

I just copied, pasted, and when I enter http://webroot/css/style.css

I saw all my css code
Maxdd 7 27-Dec-10 22:56pm View
   
Deleted
Well I dont understand.

Do you have your MyHttpHandler.cs: on /webroot? that web.config is on CSS folder ?

I just copied, pasted, and when I enter http://localhost:5304/StickyNotes3.5/css/style.css

I saw all my css code.
Maxdd 7 27-Dec-10 22:46pm View
   
Means that the handler simply dont work.

I thing the problem is related due to the fact I have to config the IIS. But the server I use does not allow that direct config.

I hope I'm wrong.
Maxdd 7 27-Dec-10 22:19pm View
   
Meanwhile what do you think of my new implementation? (I edited my question). I really believe that shoulded work.
Maxdd 7 27-Dec-10 22:09pm View
   
Here it is:
<add verb="supported http verbs" path="path" type="namespace.classname, assemblyname" />

I'll take a look at ihttpmodule.
Maxdd 7 27-Dec-10 22:07pm View
   
Deleted
<add verb="supported http verbs" path="path" type="namespace.classname, assemblyname" />
Maxdd 7 27-Dec-10 22:02pm View
   
Without the "namespace" dont work as well.

How should I use IHttpModule ?
Maxdd 7 26-Dec-10 22:55pm View
   
I had a bug with my solution, yours worked very well, thank you very much.
Maxdd 7 26-Dec-10 22:49pm View
   
By the way I take my time to think, that situation happened two or three times always in situations you helped, but it was coincidence.
Maxdd 7 26-Dec-10 22:47pm View
   
Ok i'll start sharing the solution.

I say I know because I know you're right. Honestly I dont like to read and google for asp.net solutions. I always get a lot of different solutions, there are a lot of .NET versions, a lot of controls and many programming languages that work with .NET. That's why sometimes I gave up to easily - it's very difficult to find usefull information when you dont know what and where to look. That's why I post so many questions.

But of course I should at least read a ASP.NET book, just to know how the framework works. I will search for some tutorials soon.
Maxdd 7 26-Dec-10 22:33pm View
   
I did that but didnt worked out. I know Mark, I know that's the problem. I'm really trying.

Related to the problem, I solved using a session variable on .aspx and then I use JS if necessary.

Thanks again.
Maxdd 7 26-Dec-10 21:35pm View
   
you switched the functions but that's it :)
Maxdd 7 26-Dec-10 21:00pm View
   
It wasnt me who downvoted...
Maxdd 7 26-Dec-10 20:20pm View
   
I used with public because I got button is inaccessible due to its protection level.
Maxdd 7 26-Dec-10 12:19pm View
   
This mistake its only here, its correct in my code, so still dont work.
Maxdd 7 26-Dec-10 12:18pm View
   
But how could I assign show/hide properties to buttons ?
Maxdd 7 23-Dec-10 11:33am View
   
That's what I did :)
Maxdd 7 23-Dec-10 11:32am View
   
You are absolutely right!
Maxdd 7 23-Dec-10 11:30am View
   
OK, sorry.
Maxdd 7 23-Dec-10 10:08am View
   
I know Mark.

That's why I solved the problem at server side.

int num = Convert.ToInt32(verNum());
string[] texto = new string[num+1];

texto[0] = num.ToString();

int i;

for (i = 1; i <= num; )
{
while (dr.Read())
{
texto[i] = dr[0].ToString();
i++;
}

}

and then

var num = resultado[0];
alert("num1: "+num);

for(i=1; i<= num; i++)
loadNotes(resultado[i]);

I just guess that I was able to solve the problem at client side, but ok, no prob :)
Maxdd 7 23-Dec-10 10:03am View
   
Yes I know, I guess I have to change the code on the server side :)
Maxdd 7 23-Dec-10 9:40am View
   
I tried that but I had a variable bad written that was corrupting my JS, that's why when I tried didnt worked :)
Maxdd 7 23-Dec-10 0:36am View
   
for (i = 0; i < num; )
{
while (dr.Read())
{
texto[i] = dr[0].ToString();
i++;
}

}
Maxdd 7 23-Dec-10 0:36am View
   
it worked like a charm. thank you so much :)
Maxdd 7 23-Dec-10 0:36am View
   
Deleted
for (i = 0; i < num; )
{
while (dr.Read())
{
texto[i] = dr[0].ToString();
i++;
}

}
Maxdd 7 23-Dec-10 0:34am View
   
Deleted
You mean this:

int i;

while (dr.Read())
{
for (i = 0; i < num;)
{
texto[i] = dr[0].ToString();
i++;
}
}

?
Maxdd 7 23-Dec-10 0:29am View
   
Yes you right, thanks :)
Maxdd 7 22-Dec-10 23:12pm View
   
I didnt knew it, I just discovered later. Maybe I formulated a question not clearly, my apologies.
Maxdd 7 22-Dec-10 21:39pm View
   
I rewrited my code and its working now.
Maxdd 7 22-Dec-10 21:30pm View
   
This way I get nulls again:

function verNumNotas() {

PageMethods.verNumNotas(carregarNotas);
}

function carregarNotas(result) {

var texto = result[0];
var num = result[1];

alert("istooo:" + num + "e isto "+texto);
loadNotes(num);
}
Maxdd 7 22-Dec-10 21:25pm View
   
Deleted
I tried

string[] array = new string[2];
array[0] = num.ToString();
array[1] = texto.ToString();

return array;

and in JS:

function carregarNotas(result1,result2) {

var texto = result1;
var num = result2;

alert("istooo:" + num + "e isto "+result2);

but I'm getting nulls. Any ideas ?
Maxdd 7 22-Dec-10 21:17pm View
   
i.e.; I want to return [text,id] so I can receive at Js like function carregarNotas(result1,result2) {
Maxdd 7 22-Dec-10 21:15pm View
   
I know how to do that, I already do it, but what I want is to return two variables (c#) and received them with JS. I can do it with one, my problem is do it with more than one.
Maxdd 7 22-Dec-10 13:26pm View
   
That dont work either inside a static method.
Maxdd 7 22-Dec-10 13:17pm View
   
Deleted
Yes, if I remove the static that works. But if I do that, will I mantain the AJAX working?
Maxdd 7 22-Dec-10 13:17pm View
   
I think the problem is related to the "static" method, but I need that because I use AJAX calls.
Maxdd 7 22-Dec-10 13:16pm View
   
Unfortunately that does not solve the problem. I still have that error.
Maxdd 7 22-Dec-10 8:59am View
   
One more time, if I want to use a lot of code like I have on my question, how do I do ?
Maxdd 7 22-Dec-10 8:59am View
   
But I can use only functions ?
Maxdd 7 21-Dec-10 19:29pm View
   
Thank you so much aspdotnetdev.

I tried:

public static string GetHello()
{

try
{
TextWriter tw = new StreamWriter("date.txt");
tw.WriteLine(DateTime.Now);
tw.Close();
return "Hell22o";

}

catch(Exception e)
{
return "Darn5555"+e;
}


}

I used that and now I'm getting the same exception that I had when I placed that code on page_load.

I always supposed that if I got an exception in page_load (at Visual Studio) I got the same info at a function. Well, I learned with my mistake, and I'm moving forward now.

Thanks again for the patient :)
Maxdd 7 21-Dec-10 14:55pm View
   
<pre lang="cs">[System.Web.Services.WebMethod]
public static string GetHello()
{
TextWriter tw = new StreamWriter("date.txt");
tw.WriteLine(DateTime.Now);
tw.Close();
return "Hell22o";
}

The hell22o just appears if I comment those textwriter lines, and that ones never get executed...

Any more ideas?
Maxdd 7 21-Dec-10 14:42pm View
   
Deleted
better I tried

public static string GetHello()
{
TextWriter tw = new StreamWriter("date.txt");
tw.WriteLine(DateTime.Now);
tw.Close();
return "Hello";
}

I see alert of hello, but that FILE code is not executed... :(
Maxdd 7 21-Dec-10 14:34pm View
   
Really thanks for helping you are really helping me understanding this. But still there's something left.

I did exactly as you told me to do:

In my.cs I have

[System.Web.Services.WebMethod]
public static string GetHello()
{
return "Hello";
}

[System.Web.Services.WebMethod]
public static int saveNote()
{

TextWriter tw = new StreamWriter("date.txt");
tw.WriteLine(DateTime.Now);
tw.Close();
return 0;
}

and in my .js:

function DoIt() {

alert("HERE do IT!");
jQuery.fn.stickyNotes.createNote();
PageMethods.saveNote();

PageMethods.GetHello(function(result) {
alert(result);
});
}

Strange thing: I get hello, but I didnt get any file (in page_load that code it works)..

Any other idea ? :(
Maxdd 7 21-Dec-10 13:42pm View
   
Deleted
Of course :)

Unfortunately, the saveNote function is not being reached after all. I'm not using your code because does not fit my needs.. I dont know if the problem is not having a "onclick even". My add new note function is creating using javascript too.

jQuery.fn.stickyNotes.prepareContainer = function (container) {
jQuery(container).append('<div id="sticky-container" class="sticky-container"></div>');
if (jQuery.fn.stickyNotes.options.controls) {
jQuery("#sticky-container").html('<button id="add_note">Add Note</button>');
jQuery("#add_note").click(function () {
jQuery.fn.stickyNotes.createNote();
return false;
});
}

I honestly dont know how to solve this problem :(
Maxdd 7 21-Dec-10 13:31pm View
   
Well, its working now (the .cs). So strange.

Time to create the DB and see if the AJAX its working.

Thanks for your help!
Maxdd 7 21-Dec-10 13:24pm View
   
Well I thing the problem is my default.aspx.cs for some reason is not even working.

I placed


protected void Page_Load(object sender, EventArgs e)
{
string strConn;
strConn = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["ConnectionString1"].ConnectionString;
System.Data.SqlClient.SqlConnection Conn = new System.Data.SqlClient.SqlConnection(strConn);
Conn.Open();
}

as I dont even have a connection string (web.config) and I didnt get any error. - what is happening? so strange..
Maxdd 7 21-Dec-10 13:20pm View
   
I appreciate your help, but that way I get a lot of syntax errors.
Maxdd 7 21-Dec-10 13:13pm View
   
Deleted
I appreciate your help, but that way I get a lot of syntax errors.
Maxdd 7 21-Dec-10 13:08pm View
   
Thanks, that's a stupid mistake from me.

However I think the function public static string saveNote(int note_id) its not working - executing.

I have the code I posted exactly like that "INSERT INTO..."; I dont even have the DB created, and I get any error, so that means it's not reaching that code.

What am I missing?
Maxdd 7 21-Dec-10 12:57pm View
   
But how can I place the javascript inside c# ?
Maxdd 7 21-Dec-10 11:56am View
   
Deleted
a
Maxdd 7 14-Dec-10 6:41am View
   
Yes I know, I would like to know that too.
Maxdd 7 14-Dec-10 6:40am View
   
Thanks Mark,

I'll search for the info, thank for help.
Maxdd 7 13-Dec-10 18:42pm View
   
Why would I need XML or SQL? What's the alternative? I need to save data because I use SQL DB with user's ID, and I need to assign every sticky note to the user ID, so every time a user login, he gets its stickys notes with the same content and position.
Maxdd 7 13-Dec-10 18:41pm View
   
Deleted
b
Maxdd 7 13-Dec-10 18:39pm View
   
Is really possible to integrate c# inside javascript functions? because every time I create/edit a sticky note (the code is on .js) I dont know if/how I can integrate the sql query procedure. The same problem I face with XML, because I dont know how to integrate c# code in my .js functions (i'm really new to javascript and c#, so please forgive my ignorance).

My navigation I mean: when I specify that div tag in the <body> of html, I specify a rectangle where sticky notes can be moved, and so on I'm limited that way (I cant integrate for example a login asp component inside that div tag). I hope I'm being cleary enough to understand my question.

Mark, I really dont know how to persist that info without using XML or SQL, still hoping for a guidance.

Thanks again.
Maxdd 7 13-Dec-10 18:36pm View
   
Deleted
a
Maxdd 7 30-Nov-10 9:59am View
   
Of course, I just needed to know what technologies I can use so I know for what I should research :)
Maxdd 7 30-Nov-10 9:58am View
   
Thank you very much for helping!

For what I found its possible to make what I need with AJAX and jquery.

Once I need to integrate it in asp.net webpage with MSSQL database, what should be better, and why ?
Maxdd 7 2-Nov-10 9:04am View
   
I found eggheadcafe too, but that's a full forum implementation.

That's not what I need!