|
protected void Submit1_ServerClick(object sender, EventArgs e)
{
string constr = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True";
SqlConnection con = new SqlConnection(constr);
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd = new SqlCommand("SubmitRecord1", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@ID", SqlDbType.NVarChar,10).Value = TextBox1.Text;
cmd.Parameters.Add("@Password", SqlDbType.NVarChar, 50).Value = TextBox2.Text;
cmd.Parameters.Add("@ConfirmPassword", SqlDbType.NVarChar, 50).Value = TextBox3.Text;
cmd.Parameters.Add("@EmailID", SqlDbType.NVarChar, 200).Value = TextBox4.Text;
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
stored procedure
ALTER PROCEDURE dbo.SubmitRecord1
(
@ID varchar(10),
@Password varchar(50),
@ConfirmPassword varchar(50),
@EmailID varchar(200)
)
AS
INSERT INTO login1(ID,Password,ConfirmPassword,EmailID)VALUES(@ID,@Password,@ConfirmPassword,@EmailID)
RETURN
this worked fine.....
for reference u can see link
Thanks any ways
|
|
|
|
|
i m using asp.net with c# and in backend using sql server 2000.
i have a table1(material_incoming) and i m using gridview for showing data of table1,when i click edit button at gridview,present value save in table2(edit_tab)with remark "before edit" and after updation,updated value save in table2 with remark "after edit" and also update table1.
prateek srivastava
prateekfgiet@gmail.com
modified on Monday, March 9, 2009 3:20 AM
|
|
|
|
|
I am sorry, but your question makes no sense. Try to rephrase it.
|
|
|
|
|
Is this a question ? If it is, is it a 'I did some research and tried this but it doesn't work' question, or an 'I'm a dumbass, do my job for me' question ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I am developing an ASP.NET application and i want to prevent the right click option for a particular page .How can it be achieved is there any javascript.
Thanx in advance.
|
|
|
|
|
Just Add this line in body tag
oncontextmenu="return false;"
Fastrythem
|
|
|
|
|
<HTML>
<script language="javascript">
function preventEvt(evt)
{
evt.returnValue = false;
if( evt.preventDefault ) evt.preventDefault();
return false;
}
</script>
<BODY oncontextmenu="return preventEvt(event)" onmousedown="return preventEvt(event)">
</BODY>
</HTML>
This code can works in IE and Firefox, but no way in Opera
|
|
|
|
|
There are ways to convince an ignorant client that you did this, but I guarantee you that I can circumvent all of them, if I really wanted to right click on your web page.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
amen.
What exactly are you trying to prevent?
|
|
|
|
|
function click(e)
{
if (document.all)
{
if (event.button == 2)
{
alert('Right Click Not Allowed');
return false;
}
}
if (document.layers)
{
if (e.which == 3)
{
alert('Right Click Not Allowed');
return false;
}
}
}
if (document.layers)
{
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
use this code in javascript
Mahendra Bisht.
|
|
|
|
|
Is there any way to track the changes done on another website. Like if there any price change of a perticular product on a product site then it should be reflected on my website.
Mahendra Bisht.
|
|
|
|
|
MB_1981 wrote: Is there any way to track the changes done on another website. Like if there any price change of a perticular product on a product site then it should be reflected on my website.
How did you read the content from other site? using RSS or What ?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
right now i have not apporached any way to read the contents from another site.
Mahendra Bisht.
|
|
|
|
|
If you're talking about a simple web site where they ain't providing any sort of web service, or functionality then the only way to do it would be to store a copy and periodically compare the current version with your stored version.
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
there may be more then one website and they are not providing any webservice.
Mahendra Bisht.
|
|
|
|
|
MB_1981 wrote: there may be more then one website and they are not providing any webservice.
then how you are going to read the data. I think first of all you should know how to read the data from that sites, then only you can think of update.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
yes, u r absolutely right.
Mahendra Bisht.
|
|
|
|
|
|
you have to put script manager in master page and another resaon that may be when you use master page the control id changed at client end that may be also reson
i think if you try to use the client id that is created at client your problem would be solved
thank you
|
|
|
|
|
I already have the script manager in my master page, so I am not sure what you mean about the control id that I use. I don't have anything that calls the id. The accordion has an id but I never call it. I assumed any calls were generated automatically. Can you better explain what you mean, Thanks for your response.
|
|
|
|
|
Hi ppl This is my first question......i think i will get my answer sonn.......
Right now im working in a web application.....In which most of the pages are popups..Im opening a popup window from a Main parent popup using JavaScript windows.open(),which is actually a search page,used to search for a particular user of the system.on selecting a particular user the control returns to the main popupwindow.......
The problem is when the user logs off....i need to close all the popups opened by the user..for that i used.....
window.top.close()...to close main popup window ,which has the logout button.
winsearch.close()..... to close the search popup...but this child window is not getting closed....
Im using Asp+C# for my application........Help needed ASAP.....
i think description is elborate to understand the problem.......
one of my friend told me thet after several postbacks by asp.....the reference "winsearch" used by java script got disappeared from cache memory....thats y it is not getting closed.. is that true??!!!.....
|
|
|
|
|
Welcome to CodeProject.
rajmahen wrote: for that i used.....
window.top.close()...to close main popup window ,which has the logout button.
AFAIK, window.top is not part of any standard. It looks like it works only with Mozilla.
Declare a local variable and assign the return value of window.open to it(assume variable name is searchWindow ). Hook a JS event handler in the logout button click. Inside this handler, check searchWindow and if it is assigned, call close on it.
|
|
|
|
|
Thank u navaneeth...............i implemented in tit is not working.....it closes the top window but not the child window....
This is my code snippet:
//Function to open the search user popup screen. Only one search window allowed to display
var winSearchUser;
function openSearchUser()
{
if(winSearchUser == null || winSearchUser.closed)
{
winSearchUser = window.open('SearchUser.aspx','SearchUser','height=600, width=850,status= no, resizable= no, scrollbars=no, toolbar=no,location=no,menubar=no ');
}
winSearchUser.moveTo(10,10);
winSearchUser.focus();
return false;
}
//Function to close all the child popup windows of this window
function closeAllPopups()
{
//Close the main window
window.top.close();
//Close search user popup
if ( winSearchUser != null )
{
winSearchUser.close() ;
winSearchUser = null ;
}
}
i attached the above close script in the client script manager of the main windows asp.
|
|
|
|
|
1. You can try to use window.showModalDialog instead of window.open. Though this is not a W3C standard, Firefox supports it now.
2. You can try Observer design pattern, each popup windows opens, add itself handle to the close event.
|
|
|
|
|
When compiling a resource file I am getting a series of warnings, for example:
The resource name 'NewsTech.Description' is not a valid identifier for all my resource files.
Sample from Web.Sitemap.fi.resx (resources file)
...
<data name="Funds.Title" xml:space="preserve">
<value>?</value>
...
Sample from Web.sitemap
...
<sitemapnode title="Funds" description="Mutual Funds">
url="Funds.aspx" resourceKey="Funds"/>
...
</sitemapnode></data>
Jon
|
|
|
|