|
can we use remoting through java script?
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
You can make AJAX calls via javascript.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
In my ASP .Net web application, the customer has the following requirement. Whenever user tries to close the browser by using the X at the top (the hard close), I want to throw a message popup to user saying that they have not logged out of the application. Are you sure to close? And I want to give them Yes/No options so that if they click on yes, I will let them close otherwise the browser stays open. How can I acheive this?
|
|
|
|
|
check this...[^]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
follow the steps
step1 - In HTML body tag add event onbeforeunload = "CloseX();"
step2 - In HTML header tag add the following Script function.
function CloseX()
{
if(event.clientY < 0 && event.clientX > 100)
{
event.returnValue = "Are you sure to close window?";
}
}
If you use master page add these two steps to master page only.
smile
|
|
|
|
|
Hi Friends
Two days back i have posted a question regarding connectivity of sql server with asp.net..
for a refresh : when i add sql server DB a error comes ..regarding improper working of sql
so i downloaded MDAC still problem exists ..
* Sql works fantastic never a error came *
Its only with one of my PC ..
Please advice me what to do ..
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
Did you tell us what the specific error was, last time ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
yes i did and You have suggested to install MDAC
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
Hi all,
I am displaying a list of Image thumbnails in a datalist control.
I'm creating the data souce in codebehind (C#) then binding it to my datalist.
The datasource is retieving a list of thumbnail names (strings) from my SQL dB.
This is roughly what my ItemTemplate looks like:(It works fine in IE)
<ItemTemplate>
<a href="linktomypage">
<img src="..\image\<%# DataBinder.Eval(Container.DataItem, "ImageThumbStr") %>" alt="" border="0" />
</a><br />
</ItemTemplate>
This dislays the image as intended in IE but in Firefox, Opera etc. it displays no image. If I put just the text in there (no img tag) it displays that fine.
When I view source code in FF it shows in there the completed img tag with the correct path, but nothing appears on the page?
Is there something obvious I am missing? The databiding for the control is happening on page load.
Any help would be much appreciated.
Many thanks in advance.
Mark
|
|
|
|
|
Try displaying the image outside of the link tags and see if that works
|
|
|
|
|
Yes,
I have tried that and got the same result, I have tried doing it ousite of the Datalis too in an ASP:Image tag. The image needs to be written to a control from the codebehind idealy.
If you have any suggestions it would be appreciated, I shall keep looking, just hope its not me being stupid...
Mark
|
|
|
|
|
Also change this;
markymark82 wrote: "..\image\
to ../image/
|
|
|
|
|
This is why I don't like IE trying to be clever.
Nail on the head, thanks very much
Mark
|
|
|
|
|
i download the source file of "ImportExportCSV_src" from codeproject and run this coding to import my excel to sql server. its working fine. but the thing is, i have a description column and user will enter more than 2000 characters. when i m importing, only 255 characters are uploading to the database (i declared in database as nvarchar and length 3000). whats the problem? how to resolve it? - KARAN
coding :
DataColumnCollection tableColumns = dsCSV.Tables[0].Columns;
DataRowCollection tableRows = dsCSV.Tables[0].Rows;
OpenConnection();
foreach (DataRow row in tableRows)
{
primary_key = row.ItemArray[1].ToString();
string sqlinsert = "INSERT INTO " + strTableName + "(";
string sqlvalues = "VALUES (";
object[] rowItems = row.ItemArray;
int ctrColumn = 0;
foreach (DataColumn dc in tableColumns)
{
if (ctrColumn < tableColumns.Count)
sqlinsert += "[" + dc.ColumnName.ToString() + "]" + ",";
if (ctrColumn < tableColumns.Count)
sqlvalues += "'" + rowItems[ctrColumn].ToString().Replace("'", "''") + "',";
ctrColumn++;
}
sqlinsert = sqlinsert + sqlvalues;
cmd = new SqlCommand(sqlinsert, conn);
try
{
rowscreated += cmd.ExecuteNonQuery();
strreturn = rowscreated.ToString();
}
catch (SqlException ae)
{
textbox1.Text=ae.ToString();
}
cmd.Dispose();
}
CloseConnection();
the thing is, when i check the row value (row.ItemArray) it can hold only 255 characters. so i cant upload the full 2000 characters. how to proceed this? help me ! - KARAN
|
|
|
|
|
I m using javascript in my project for certain actions ,...
now i dont want to show my javascript to all....
hoe can i hide js file?
Amit Metkar
3i-infotech, Mumbai.
|
|
|
|
|
You can link to it in your page instead of putting script in your page, but if the file is not available to an end user, then they can't use it. So, you cann't hide it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
even if u give the path instead of putting js code in the aspx page, when u save the page that .js file also get saved in the disk.
i dont want even this.
Thanks For the Reply.
Amit Metkar
3i-infotech, Mumbai.
|
|
|
|
|
Well, as I said, you are screwed. Welcome to web development. If you don't give the user your js code, they can't run it. You can't protected it. You can obsfucate it, but that's about it, people can still reuse it.
Why did I get a 1 vote for helping you ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks budy, but u told me what i knew already.
I just wanted to know, any method to hide those things like by encrypting them.
Amit Metkar
3i-infotech, Mumbai.
|
|
|
|
|
Fine - well, would you be better off if I didn't confirm that it can't be done ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I didn't mean that way.....
Thanks for the Help....
Amit Metkar
3i-infotech, Mumbai.
|
|
|
|
|
|
Well, if you're happy to force your users to accept an ActiveX control, and you're willing to assume they will do it ( I never accept ActiveX controls from an unknown site ). I would never use it, but if it solves your problem, I am glad.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Amit Metkar
3i-infotech, Mumbai.
|
|
|
|
|
you can save the file in js format but in the irregular format ( e.g all the code in one line or use spam code ) ( google do this in the "map" service )
|
|
|
|