|
<script>
close the Tag
and lets see how you use it in the server side
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
function PikCode(textid)
{
String myval = document.getElementById(textid).value;
alert('myval');
Session["txtcode"] = myval;
}
In cs file:
string txtcode = Convert.ToString(Session["txtcode"].ToString());
|
|
|
|
|
Ohh sorry
This is how the session is used in javascript, it did not see this
<script language="javascript">
function PikCode(textid)
{
String myval = document.getElementById(textid).value;
alert('myval');
<%=Session("txtcode")%>= myval;
}
</script>
Regards
Vuyiswa Maseko
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
hi ,
ur code is giving following error
'System.Web.UI.Page.Session' is a 'property' but is used like a 'method'
Thanks ,
Amit PAtel
|
|
|
|
|
What code are you talking about ?
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
<%=Session("txtcode")%> = myval;
This statement gives error like,
'System.Web.UI.Page.Session' is a 'property' but is used like a 'method'
|
|
|
|
|
ohhh ok
change the brackets and make them curly, its true its been used like a method while its not its a session. so that means you need to change it so that it looks like this
<%=Session["txtcode"]%> = myval;
Tell me if it helped
Regards
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
No, its not working.
still session is null.
|
|
|
|
|
ok Please Post the Javascript that you currently have now and the way you access it in the Server side.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
In aspx file,
function PikCode(textid)
{
String myval = document.getElementById(textid).value;
<%=Session["code"]%> = myval;
}
in the cs file,
if (!IsPostBack)
{
txtcode.Attributes["onblur"] = "PikCode('ctl00_ContentPlaceHolder1_txtcode')";
}
in the user control i m accessing this session, code is,
if (FileUpload1.FileBytes.Length > 0)
{
if (FileUpload1.HasFile == true)
{
string txtcode1 = Convert.ToString(Session["code"].ToString());
FileUpload1.SaveAs(Server.MapPath ("~/AdminSection/Products/Chemicals/"+txtcode1+FileUpload1.FileName.ToString()));
}
}
This is my code.
|
|
|
|
|
Hi priya
in place of <%=Session["code"]%> = myval;>
if i use
<%=Session["txtcode"]= "sf"%>
then we can assign value but how to assign from java script not able to find out can u tell where u need this.
Thanks ,
Amit Patel
|
|
|
|
|
Try this
You are Converting it to string Twice in one code
string txtcode1 = Convert.ToString(Session[""code""]);
If you did this on the server side, it would have been better, you could have a hidden Field and pass the value and access it in the server side.
it think the Problem was that the Session name need two double quotes each.
Try it
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi
I am using xml and xslt for generate MS word doc.
In xml there is a attribute <Comment></Comment>
This comment attribute contains Rich text(HTML formatting) and this attribute is populated dynamically.
I generate doc by using following function
public static byte[] CreateWord(XmlReader xmlData, XmlReader xsltReader)
{
// Initialize needed variables
XslCompiledTransform xslt = new XslCompiledTransform();
XsltArgumentList args = new XsltArgumentList();
using (MemoryStream swResult = new MemoryStream())
{
// Load XSLT to reader and perform transformation
xslt.Load(xsltReader);
xslt.Transform(xmlData, args, swResult);
return swResult.ToArray();
}
}
When i create the word document the HTML formatting is removed. The comments are written in document in Plain text format.
Can anyone tell me how to fix this? Any help is greatly appreciated.
|
|
|
|
|
Hi guys i have used with in updatepanel, timer control for changing my ads dynamically...,
now my probs is in my page if i scroll down and look at the bottom contents...,
when ever my timer getting refresh the content using the updatepanel...,
my page losing the focus and go to the top of the page...,
how to avoid it and fixing the page focus...,
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
</asp:GridView>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="gvCardFeesRReport" />
</Triggers>
</asp:UpdatePanel>
Try using this code before closing the UpdatePanel. Change gridview ID in COntrolID to ur Gridview ID.
Hope this helps you.
Inderjeet Kaur
Sr. Software Engg
|
|
|
|
|
Hi inderjeet,
I didnt ask u for postback event...,
i said clearly i used timer control for updatepanel content...,
so page wont get postback...,
it will do partial postback...,
in that i am losing the page focus...,
plz go through this url:
http://124.153.80.135/[^]
just go to some wht bottom page...,
when my timer getting tick event the page will lose the focus...,
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
i want to know why my menubar control is not working in Internet Explorer
when i open my application(menubar) in Mozilla its working correctly
do i have to change any settings in my IE
..............thnks in advance
|
|
|
|
|
kiranreddy wrote: when i open my application(menubar) in Mozilla its working correctly
Is there any CSS you are using with Menu Control ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
no nothing a plain menubar with autoformat
|
|
|
|
|
Add BrowserFile to Your Application and ie Add new item -->Browserfile .browser and delete the exisisting code and add the follwing Code in the browser file
<browsers>
<!----><browser refID="safari1plus">
<!----><controlAdapters>
<adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />
</controlAdapters>
</browser>
</browsers>
If this Not the Answer Sorry If it Works let me know
|
|
|
|
|
I have used something for GoogleChrome problem. Use can use something like this for IE prob
if(Request.UserAgent.Contains("AppleWebKit"))
Request.Browser.Adapters.Clear();
Inderjeet Kaur
Sr. Software Engg
|
|
|
|
|
Hi,
Is there any option to use OracleBulkCopy in Asp.net. How to use it? What is the namespace?
|
|
|
|
|
no there is no method like oraclebulkcopy, you have to use loop for bulkcopy in c#.net
|
|
|
|
|
hello sir,
how can i take hindi input in a textbox and save it in database
i am using vs2005 and ms-sql2000
what is the collation for hindi in sql2000
|
|
|
|
|