|
Thanks
In my application i am generatind some id by the C# code and now i have to pass this value to tha javascript funtion.
this all code occour on a single button click..
Now wht to do....
When i am trying to execute both the code javascript code executes first and C# code comes letter..that is wht i don't want...
What can i do now...
Halp me...........
Deepak Nigam
|
|
|
|
|
You can't change this. Tell me what you are trying to do. What you are doing in JS after a server side processing ? Are you trying to show some alerts ?
deepaknigam11 wrote: C# code and now i have to pass this value to tha javascript funtion.
You can declare a public variable in the code behind and can be accessed in JS like this
var a = <%= publicVariableName; %>
|
|
|
|
|
hi navaneeth can we use like this
ClientScriptManager.RegisterStartupScript(me.gettype,"some name","javascript function name",true)
is this syntax is correct..
|
|
|
|
|
Hi Navaneeth
In my application i am generating a random name that i have assigned to an image.
now through javascript i want to access this name in the clipboard.......
So that he/she can paste it whereevrhe wishes.
I am unable to get it as javascript code executes before the name generated......
Deepak Nigam
|
|
|
|
|
ScriptManager.RegisterClientScriptBlock(Page, this.GetType(), "onClick", "try{hidedg();}catch(ex){}", true);
Best Regards,
Trishul Tandel
Software Developer
|
|
|
|
|
Hello friends...
In my application i have to copy some text on the clipboard.
But i am unable to do it using window.setdata() meathod of javascript..
One of the the other meathod that i found is using execCommand() meathod but it works only with IE not with Firefox....
Is there any other way to do this...
Help me plzz..................
Deepak Nigam
|
|
|
|
|
Hi,
I would like create a pdf report from asp.net using c# without using crystal reports.
Gopinath.R
modified on Wednesday, March 12, 2008 6:50 AM
|
|
|
|
|
|
how to get a files of a folder with extensions and how i can remove a file with extension .tif. using javascript.
|
|
|
|
|
Hi,
I have framework 1.1 and 2.0 on my local machine and I have installed framework 3.0 on my machine but my local IIS manager propertiws shows only framework 1.1 and 2.0 in the list it does not shows the framework 3.0. Sop that I am not able to use farmework 3.0. Please give me some solution so my local machine cam use framework 3.0
Thanking You!
Rock Star
|
|
|
|
|
looks like 3.0 is an extension of 2.0 thereofe you wont see it in the list:
http://msdn2.microsoft.com/en-us/windowsvista/bb188202.aspx
|
|
|
|
|
Hello
I try to use AdRotator in a small application but the image don't appear just the value of the alternate text appear instead and when i click it give me "HTTP Error 400 - Bad Request."
any Ide to help me it greatly appreciate
Thanks in advance
Assaf
modified on Wednesday, March 12, 2008 7:31 AM
|
|
|
|
|
I tried to write cookie with my Cookie set to off ( I am using IE 7 ), surprisingly I found my cookie in Temporary Files!
It makes my detection error then..
Any idea why I still manage to write cookie while my cookie is off?
My code is just as simple as below:
HttpCookie cookie = System.Web.HttpContext.Current.Request.Cookies["MyCookieTest"];
if (cookie == null)
{
cookie = new HttpCookie("MyCookieTest");
}
cookie["Name"] = "Hello World";
cookie.Expires = System.DateTime.Now.AddDays(1);
System.Web.HttpContext.Current.Response.Cookies.Add(cookie);
if (cookie != null)
{
Response.Write("Cookie created");
}
|
|
|
|
|
Is it possible for adding datagrid inside the datagrid..If anyone know please reply me..
Thanks in advance...
Rajendran.AL
|
|
|
|
|
check this out
http://www.netomatix.com/GridInGrid.aspx
|
|
|
|
|
u got any asp.net meterial plz send me srinath.02@gmail.com
and a topic on grid views i am
|
|
|
|
|
Try searching on the internet for an article that is suitable
|
|
|
|
|
Hello all,
I have developed a web application in ASP.Net using C# with login credentials.
I am getting following problem with it.....
I am logging in as user suppose "abc" from one computer in a network, its working fine. At the same time, i m logging in as different user say "xyz" on other computer. After this, when i refreshes my "abc" user's page it shows all contents as well as username listing of "xyz" user and i am not being able to see "abc" user's content then. Both pages are showing contents of "xyz" user.
If i login with another user say "pqr" on different page without logging out first two users, then all three pages displays the contents of "pqr" user.
I am not getting where the actual problem is, please anyone of u can help me with this?
Here is my code......
private void BtnSubmit_Click(object sender, System.EventArgs e)
{
Label1.Visible=false;
bool persistcookie=true;
if(ValidateUser(TextBox1.Text,TextBox2.Text))
{
//string globalstrConn="Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=iMedia;Integrated Security=SSPI;";
Session["UserName"]=TextBox1.Text;
//This will store the username of the user in this session variable
// We can retrieve this username on different pages by using following code.
// string str=Convert.ToString(Session["UserName"]);
FormsAuthenticationTicket tkt;
string cookiestr;
HttpCookie ck;
tkt=new FormsAuthenticationTicket(1,TextBox1.Text,System.DateTime.Now,System.DateTime.Now.AddMinutes(Convert.ToInt32(ConfigurationSettings.AppSettings["timeout"])),persistcookie,"Your Custom Date");
cookiestr=FormsAuthentication.Encrypt(tkt);
ck=new HttpCookie(FormsAuthentication.FormsCookieName,cookiestr);
if(persistcookie)
ck.Expires =tkt.Expiration;
ck.Path =FormsAuthentication.FormsCookiePath;
Response.Cookies.Add(ck);
string strredirect;
strredirect=Request["ReturnUrl"];
if(strredirect==null)
strredirect="login.aspx";
Response.Redirect(ConfigurationSettings.AppSettings["defaultpage"],true);
}
else
{
Label1.Text="Invalid Credentials!";
Label1.Visible=true;
// Response.Redirect("login.aspx",true);
}
}
Please someone help me.
Thanks,
Nagendra.
|
|
|
|
|
Are you opening a new browser window when you log in as another user or are you logging in using a new tab in the same window.
|
|
|
|
|
I am facing same problem in both ways either opening a new browser window or using a new tab.
|
|
|
|
|
How do I indicate that an image button is disabled? Do I have to provide an alternate image, or is there some more sensible way?
It is quite important that the user knows when the button is enabled and when not, as it's sort of a guidance.
|
|
|
|
|
imagebutton.enabled = false
|
|
|
|
|
That only disabled the button, it doesn't change the image. Oops, you've just reminded me that I now have a nicely greyed out but still enabled button.
|
|
|
|
|
You could have two images buttons and then use them like following:
if (imagebutton.enabled == false)
{
Imagebutton1.visible = true
}
else
{
Imagebutton2.visible = true
}
|
|
|
|
|
That's unnecessarily complicated, as simple as it is. For now I just use two images, one green and one grey. I was curious as to there being a more elegant solution, but the only candidate there is a control derived from ImageButton that has two ImageUrl properties, and renders the appropriate one depending on its Enabled property.
|
|
|
|