|
It is Very Simple.
Get it
Regards,
Satips.
|
|
|
|
|
try
btnexit(--- ---)
{end;
}
Aryan
|
|
|
|
|
write this in the button click event(C#)
Response.Write("javascript: parent.opener=''; " +
"parent.close();");
|
|
|
|
|
I am new to VS 2005 and I have designed an application in ASP.net 2.0 . For running the same application in another computer,but its not working. Even I have removed "Use proxy server for LAN connection" also in that computer. and I have entered
http://computerame/webpage.aspx, its not working
even I checked for
http://computername/application folder/webpage.aspx, it is not working
Please help me urgently
Thanx in advance
|
|
|
|
|
Do you have IIS configured to serve the ASP.NET app on your PC, or were you just using the built in web server ? The built in one that runs with F5 is local only, you need to host it in IIS.
Define 'not working', what happens in the browser on the other machine ? Can the other machine 'ping' yours ? Can it get to the point of accessing your file system ( it doesn't need to do this, of course )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi frnd,
have you yet tried Virtual Directory
hope it will help you
-koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
How can i refresh a page without using a javascript code?im using asp.net+c#..
|
|
|
|
|
GO for F5.
Regards,
Satips.
|
|
|
|
|
i need c# code..any possibility?
|
|
|
|
|
Hi
You can implement the refresh process with the help of a Button.
Check this code for counting how many times the page is refreshed
static int pageRefresh;
protected void Page_Load(object sender, EventArgs e)
{
lblRefresh.Text = "The page is refreshed '"+pageRefresh+"' times";
}
protected void btnRefresh_click(object sender, EventArgs e)
{
pageRefresh += 1;
Page_Load(sender,e);
}
Cheers
Chandu
|
|
|
|
|
you can refresh the page with the below code
nn is the seconds. if nn=5 then evry 5 mins it will get refershed.
add this in aspx page above form tag.
you can also do a Response.Redirect(Samepage.aspx)
|
|
|
|
|
Hello;
Iam using asp.net 2.0 and Added Gridview to my webpage
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="NewsID" EmptyDataText="There are no data records to display."
DataSourceID="SqlDataSource1" Style="position: relative; left: 4px; top: 44px;" OnRowCommand="Grid1_Command" AllowPaging="True" PageSize="8" >
<Columns>
<asp:ButtonField ButtonType="Image" CommandName="CmdUp" ..>
.......
protected void Grid1_Command(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e)
{
// Object o = sender;
String ERR = (String)e.CommandArgument;
case "CmdUp":
{
break}
in this command i make modefeaction on databse in colum order
and the dataview displayed in order feild in database
my problem i have tried to trace the code and i found that commad excute twice
why????
aj123
|
|
|
|
|
Hmm, it looks like you haven't set e.Handled = true;
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
where?
Ihave tried write in Grid1_command { but there is now e.Handle
can till me the best way to solve at
aj123
|
|
|
|
|
Hi everyone,
My application is something like this.....
I have a TextBox and a Button in my Start Page.
When I click the button TextBox text is assigned to ViewState and the page should redirect to the next page.
In the second page I have a Button to redirect the page to the Start Page.
When I am doing so,I am not getting the text which I entered previously as I used ViewState.
My code is
Page 1:
protected void Page_Load(object sender, EventArgs e)
{
if (ViewState["Name"] != null)
{
txtName.Text = ViewState["Name"].ToString();
}
}
protected void btnEnter_Click(object sender, EventArgs e)
{
ViewState["Name"] = txtName.Text;
Response.Redirect("ViewState2.aspx");
}
Page 2:
protected void btnPrev_Click(object sender, EventArgs e)
{
Response.Redirect("ViewState1.aspx");
}
Help me in this regard.
Thank u
Chandu
|
|
|
|
|
Hi,
K V S Chand wrote: I am not getting the text which I entered previously as I used ViewState.
Yes, You could not get it. B'cos ViewState simply keeps the values between the page postback.
Regards,
Jay
|
|
|
|
|
Thank u.
What u said is right.
My doubt is, if u r developing an application on registration form,where u have many fields to enter.
After filling all the fields you will press Submit or whatever, then the page will PostBack and Insert all the fields into the DataBase.
In this context, if you abserve all the text u entered in the TextBoxes will be their even after the PostBack except RadioButtons,CheckBoxes etc, untill and unless you clear it programatically.
Then what is the need of this ViewState as the Values are unchanged after the PostBack also.
Thank u
Chandu
|
|
|
|
|
Chandu,
K V S Chand wrote: all the text u entered in the TextBoxes will be their even after the PostBack
Yes, it is TRUE. B'cos that control has the Property called 'EnableViewState'; By default it has set to True. So the control itself saves its 'control information' in viewstate. (NOT explicitly required by you). Have you got it?
Regards,
Jay
|
|
|
|
|
Thank u.
Even after I set EnableViewState to False to the TextBox, the text remained same.
What the reason for this?
If I want all the values which I have enter in the Page1 after I moved to a couple of pages and then returned to the Page1, how I can I make it.
Thank u
Chandu
|
|
|
|
|
Thank u.
Even after I set EnableViewState to False to the TextBox, the text remained same.
What the reason for this?
If I want all the values which I have enter in the Page1 after I moved to a couple of pages and then returned to the Page1, how can I make it.
Thank u
Chandu
|
|
|
|
|
Try use Session, instead of ViewState (Or) Pass the textbox Value in URL (Or) PreviousPage.FindControl()
(eg) Session["Value"]=txtbox.Text;
Regards,
Jay
|
|
|
|
|
Yah! I got it.
Thank u
Chandu
|
|
|
|
|
You can use cross page postback to do this in ASP.NET 2.0, otherwise, the viewstate contains only the state of controls that are on that page and have viewstate turned on.
Use the session or the URL to pass stuff between pages otherwise.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
To get a better idear which line in a datagrid will be removed I want to add some data from a gridviewrow to a javascript function
The function is is called CollectData(Person)
{
..... some code
return concatenated_string;
}
In the gridview I want to run the javascript in the OnClientClick event
onClientClick="javascript: return comfirm(CollectData(whatshouldcomehere))"
How can I use the <%#DataBinder.Eval(Container.DataItem, "Person")%> on the whatshouldcomehere spot?
|
|
|
|
|
Hi
1. For calling javascript for an onClick event, you should write code in ItemDataBound event of datagrid as shown below:
private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)<br />
{<br />
String strJavascript = "";<br />
strJavascript = "alert('" + e.Item.Cells[0].Text.ToString() + "')";<br />
e.Item.Attributes.Add("Onclick",strJavascript);<br />
}
2. If your bound column 'Person' is at column 2 in the datagrid, then pass e.Item.Cells[1].Text.ToString() as an index starts from 0.
Hope you got it.
Harini
|
|
|
|