|
na3em 2009 wrote: iam working an access control by magnatec car in order to make connection between the mahien and asp.net
I have read this at least 15 times, and I still have no idea what it means. Dictionary.com tells me there is no such word as 'mahien'.
na3em 2009 wrote: n this type "12/1/2009|123|12 " the date is the exipry date of the card and 123 is id of the student my problem is i need to put a read button near the text box but to read only the id not all info in order to bring data about the id from the data base
I can't make sense of this either. I *think* you want to get some data out of this. The reason the string has the pipe (|) as a seperator, is that it's unique. You can use the Split method on the string class to turn this into an array of three strings, the date, then 123 then 12. Then you can deal with them from there, if you want to show only one of the three.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi,
I am using modalpopupextender for my login and user Registration purposes on masterpage. its works fine simple content page, but when i load a page which contain(multiview and view controls) then page is loaded but links on that page does not works. please help me
Regards
|
|
|
|
|
debug it carefully sounds like something is getting mixed up most probably scripts.
|
|
|
|
|
Hi All
We want to get the Ipaddress of the user who visites our page ..
I tried with "Request.UserHostAddress" but could not get the address properly..
I want to store it in database.Plz help
Thanks®ards
Ramkumar
Ramkumar
|
|
|
|
|
Check
Request.Servervariables["REMOTE_ADDR"];
or
Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
|
|
|
|
|
"HttpContext.Current.Request.UserHostAddress;
or
HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
To get the IP address of the machine and not the proxy use the following code
HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];"
Two seconds with google.
You realise most people dial into their ISP and don't have a fixed IP address, right ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Have a look here[^]
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Any possibility to avoid cache in asp.net
|
|
|
|
|
You mean apart from turning it off ?
Most people ask this because they've written bad security code, and need to fix it. Is that your problem ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
In my page While the landingpage was load, the videos are displayed. Then i move to another page name video.aspx and upload one new video.when i move to the landing page That currently inserted video is not reflected in the landing page. I think because of cache problem.Any solution?
|
|
|
|
|
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
anushh wrote: That currently inserted video is not reflected in the landing page. I think because of cache problem.
Yes it is because of caching.
Browsers cache content depending on the URL. So when video is uploaded, change the URL of the video so that browser will load the latest content. To do this, add a dummy time stamp to the video link. Something like video.aspx?videoid=10×tamp=somerandomvalue
since the random value will be different each time, browser will be forced to load a latest version for each request.
|
|
|
|
|
You mean server cache or client cache ??
|
|
|
|
|
|
Remove Output Cache for One Page
HttpResponse.RemoveOutputCacheItem("/foldername/CacheForever.aspx");
Add Key Dependency to Page
Response.AddCacheItemDependency("clearcachekey");
Means we placed a dependance on smallkey. Now place this in global.aspx
protected void Application_Start(Object sender, EventArgs e)
{
HttpContext.Current.Cache.Insert("clearcachekey", DateTime.Now, null,
System.DateTime.MaxValue, System.TimeSpan.Zero,
System.Web.Caching.CacheItemPriority.NotRemovable,
null);
}
or add this in pageload on which you want to remove cache :
HttpContext.Current.Cache.Insert("clearcachekey", DateTime.Now, null,
System.DateTime.MaxValue, System.TimeSpan.Zero,
System.Web.Caching.CacheItemPriority.NotRemovable,
null);
|
|
|
|
|
plz tell me javascript validation for a textbox for blank and only characters and for only numbers.
and tell me how we use this function in textbox event.
thanks
|
|
|
|
|
hey go to Google
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/
|
|
|
|
|
Well, if you want to hire someone to do your job for you, the job board is just over there. On the other hand, if you intend on being a programmer yourself, you should look up regular expression validators in that book that you surely bought to help you learn ASP.NET.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
use
onblur="javascript: return reqcheck()" id="txt"
function reqcheck()
{
var txt = document.getElementById('txt');
if(txt.value.length == 0) return false;
return true;
}
|
|
|
|
|
Um, this will return true or false for one of the cases he mentioned, but how will it perform validation ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I dont know why those people dont use RequiredFieldValidators or RegularExpressionValidators for this.... I think those checks both in server as well as client..
Anyway, he can trap others in
form onsubmit="javascript: return validatefunction();"
I guess. I thought he can do the others himself.
|
|
|
|
|
Abhishek Sur wrote: I thought he can do the others himself.
*grin* if he were capable of that, he'd be capable of working out what a regularexpressionvalidator was.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Yes you are right.
|
|
|
|
|
|
Hellon every one.I have a table as follow;
Node_Id Node_Name Parent_Id
1 Classified 0
2 Job 1
3 Matrimony 1
4 Property 1
5 ChildofJob1 2
6 Childofjob2 2
i am using following code,but its not giving me proper structure.
My logic is,i add the node in to treeview at the same time i also check is this node present into Arraylist or not,if yes then i don't add that node if no then add the node to treeview as well as arraylist also.This procedure used for each and every node of tree.
// For database operation
OdbcConnection con = CodeClass.GetConnetion();
OdbcDataAdapter adapter1 = new OdbcDataAdapter("select * from AdminAddNewItem ", con);
OdbcDataAdapter adapter2 = new OdbcDataAdapter("select * from AdminAddNewItem ", con);
DataSet ds = new DataSet();
adapter1.Fill(ds, "Parent");
adapter2.Fill(ds, "Child");
ds.Relations.Add("relation", ds.Tables["Parent"].Columns["Node_Id"], ds.Tables["Child"].Columns["Parent_Id"]);
// ========================================================================================
//I am takeing a arraylist in which i am going to maintan all nodes
ArrayList list = new ArrayList();
string listitem;
int flage1 = 0;
int flage2 = 0;
//=============================
foreach (DataRow Prow in ds.Tables["Parent"].Rows)
{
// code for add parent nodes
TreeNode pnode = new TreeNode(Prow["Node_Name"].ToString(), Prow["Parent_Id"].ToString());
//code for chech whather the node already present or not
for (int i = 0; i < list.Count; i++)
{
if (pnode.Text.ToString() == list[i].ToString ())
{
flage1++;
break;
}
}
if (flage1 > 0)
{
flage1 = 0;
Response.Write("Node already exist");
}
else
{
TreeView1.Nodes.Add(pnode);
list.Add(pnode.Text.ToString());
}
//code for add Child nodes
// if (Prow.GetChildRows("relation") != null)
{
foreach (DataRow Crow in Prow.GetChildRows("relation"))
{
TreeNode Childnode = new TreeNode(Crow["Node_Name"].ToString());
pnode.ChildNodes.Add(Childnode);
list.Add(Childnode.Text .ToString ());
}
}
}
|
|
|
|