|
Hey
i am new to asp.net.
I just made a small user control now i want to see it on a toolbox provided with visual Studio 2005 how can i do it...
Thank You
Vikram
|
|
|
|
|
HI vikram
Usercotnrol can't be added in toolbox
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
Thanks.....
Vikram
I Code...
|
|
|
|
|
I am trying to change values of margins in Registry using C# but for path Software\\microsoft\\internet explorer\\pagesetup i got null reference, in regedit list i have path.
Code which I am using is:
RegistryKey pk = Registry.CurrentUser.OpenSubKey("Software\\microsoft\\internet explorer\\pagesetup", true);<br />
pk.SetValue("margin_top", "0.20000");<br />
Is there permisions case or anything else? How can I solve it? Thanks in help to everyone.
I Love SQL
|
|
|
|
|
I tried on admin User it worked...
sending you the code..
RegistryKey r = Registry.CurrentUser;
RegistryKey r1 = r.OpenSubKey("Software\\Microsoft\\Internet Explorer\\Page Setup",true);
r1.SetValue("Mykey", ".Net");
r1.Close();
Vikram
I Code...;)
|
|
|
|
|
Thanks for your reply.
I can figure that if user is not admin then user can not change values in registy so I'm gonna leave this option and as option I will call Print Preview with javascript.
If you ever have called Print Preview with Javascritp plz share me code.
Regards
I Love SQL
|
|
|
|
|
I allready found way how to open print preview using Javascript.
Thanks for your time
I Love SQL
|
|
|
|
|
hi,
I am facing a problem with window.showModalDialog() when working with
parent child pages in asp, my problem is ,i am unable to get the values
that
set on the child page to paent page
the scenerio is
(Parent page)
parent.aspx --contains a button say ShowChildBtn,a label
MessageFromChildLabel
------------------------------------------
in the button click I wrote the following code
protected void ShowChildBtn_Click(object sender, EventArgs e)
{
session["Var1"]="Page 1";
string script = "<script
language="\"JavaScript\"">window.showModalDialog('Child.aspx');";
Page.RegisterStartupScript("tempscript",script);
}
page_load of parent contains
if(session["Var2"]!=null)
{
MessageFromChildLabel.Text=session["Var2"].tostring();
}
Child.aspx --contains a button say ReturnToParentBtn,a label
MessageFromParentLabel
---------------------------------------------------
in the button click I wrote the following code
protected void ReturnToParentBtn_Click(object sender, EventArgs e)
{
MessageFromParentLabel.Text=session["Var1"].tostring();
session["Var2"]="Child Page";
string script = "<script
language="\"JavaScript\"">window.close();";
Page.RegisterStartupScript("tempscript",script);
}
when iam running the application
clicking the ShowChildBtn in parent.aspx
child window is getting popup with label containing "Page 1";
when i am clicking ReturnToParentBtn
session["Var2"] is storing a value and returning to parent.aspx
my PROBLEM IS HERE I WANT TO REFRESH THE PAGE AUTOMATICALLY,
SO THAT THE MessageFromChildLabel DISPLAYS A VALUE WITHOUt
manually refreshing the page
salmon
|
|
|
|
|
salmonraju wrote: my PROBLEM IS HERE I WANT TO REFRESH THE PAGE AUTOMATICALLY,
SO THAT THE MessageFromChildLabel DISPLAYS A VALUE WITHOUt
manually refreshing the page
Try Window.Opener.location.href='YourFile.aspx'
|
|
|
|
|
am using visual studio 2005express edition asp.net using c# and I am trying to create a popup calender so
when a user click on a image on the main form, a calender will then popup,
the user will select a date and the date will then be passed back to the main
form and populate a textbox. it works fine. but when i used master page for
all my pages and i put the textbox inside the content , the calender pops up
but when i select the date nothing happens .. the textbox was not populated
with the selected date from the calender and the window was not closed.
Here is my code
my main form i have 2 textboxs and 2 buttons to pick the date..for each button i have the script to cal the popup calendarwindow.
in the calendarpopup window i have one caledar control and one button the code for that is..
protected void cldrdate_SelectionChanged(object sender, EventArgs e)
{
txtdate.Text = cldrdate.SelectedDate.ToShortDateString();
Session["date"] = cldrdate.SelectedDate.ToShortDateString();
}
protected void Button2_Click(object sender, EventArgs e)
{
var MyArgs =document.getElementById('txtdate').value;
window.opener.update(MyArgs);
window.close();
}
it was working properly before using with the master pages..
hw can i do it with masterpages...plz help me..thanks..
|
|
|
|
|
|
Where have u coded javascript function?
In master page or in content page?
Best regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
i copied it in the content page.
|
|
|
|
|
try to open viewsource and locate the id from (getElementbyid) you'll notice that its changed due to contentpage which something that asp.net do copy that id and replace it with foormal id and try it , it should work.
|
|
|
|
|
good day again guyz,
does anyone can help on how to display something like a message box that will contain five(5) TO ten(10) records from the database...
the scenario if i click a button(view records) from my main page,
then a look alike message box will contain number of records....
thank you guyz... your help is highly appreciated,....
start a new beginning in every ending; thats what life for......
|
|
|
|
|
You can create a normal aspx page then open it as a popup window using javascript window.open. In that page you can display the records as you want.
Apurva Kaushal
|
|
|
|
|
thank you sir.... sorry for my late reply...
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Always welcome..
Apurva Kaushal
|
|
|
|
|
First of all Thanks in Advance , I am beginner in .net i just completed my masters i love my work and i love .net can any one tell me how to enable and disable login and logout .I will explain u clearly i am doing with asp.net 1.1 with c# i have 48webforms user can login from anypage.when user clicks login hyperlink it redirect url to login.aspx and when user when user signup it redirects url to registration page and logout link redirects to login.aspx. so i design three hyperlinks and one label in header.ascx .one for login ,one for signup and one for logout and label for welcome message when user login. All i need is how to enable and disable when user login loginhyperlink and signup hyperlink will be disabled and logout hyperlink and label will be enable. when user logout then logout hyperlink and label will be disable and loginhyperlink and signup hyperlink will be enable . can u tell me how to write the code and when user clicks logout then session will get closed . Again if he wants to login he need to type his username and password. Can u tell me how to write this code . Once again thanks to all. Can u send me the code to my mail adityaasv@gmail.com. Thanks Can u help me out
|
|
|
|
|
What you need to do it to check the session if the user is logged in (in this case you van hide/ disable other hypelinks) if user has not logged in the logout button will be hidden and others will be visible. You can write these code in the page where you are having you hyperlink buttons are placed.
Apurva Kaushal
|
|
|
|
|
Can any one tell me how to write code to disable and enable login and logout controls,i use three hyper links and one label can any one plz tell me the code.
|
|
|
|
|
If you are using hyperlink control the you can disable it by
HyperLink1.Enabled = false
and enable it by
HyperLink1.Enabled = true
Apurva Kaushal
|
|
|
|
|
aditya.net wrote: can u tell me how to write the code and when user clicks logout then session will get closed
Session.Abandon
aditya.net wrote: Again if he wants to login he need to type his username and password. Can u tell me how to write this code
You need to check for session in the page load or in user control. If not logged in redirect user to login page. When he logged in you need to start a session for that user. Session.Abandon will close current session.
|
|
|
|
|
good day to you all,
everything is well, but i have some minor questions regarding:
how to close a web page using a button in asp.net?..
i know how to close a form in vb.net but not in asp.net..
pls i need you help.. thank you...
start a new beginning in every ending; thats what life for......
|
|
|
|
|
<Script Language="JavaScript"><br />
window.close();<br />
</Script>
|
|
|
|