|
Thanks Dan
Its a client side. i need to open the site as a regular internet user do, on screen.
check the information on screen and access to txtbox with no human intervention.
how to do that?
|
|
|
|
|
You can download the the web page using a httpWebRequest object (I think thats its name - its definitely close).
Parse the web page that is returned for the name of the textbox and then parse its value - that should do it.
At university studying Software Engineering - if i say this line to girls i find they won't talk to me
Dan
|
|
|
|
|
Hi there,
Ok.. not really too grate on the C# / Generics bit.. so feel free to laugh!
I have a simple idea.. a stupid implementation!
I am trying to create a generic method to cache something (i.e. string, hashtable, etc), and the a simple method to return that cached generic value without unboxing.
So I have something like:
(Create method)
public void add<T>(string ID, T itemAdd)
{
Cache.Insert(ID, itemAdd);
}
(Retrieve method)
public void ret<T>(string ID, T itemBack)
{
itemBack = Cache.Get(ID);
}
Okay, okay, I know that doesn't look right, and the only way I can get it to work is:
public void ret<T>(string ID, T itemBack)
{
itemBack = (T)Cache.Get(ID);
}
Obviously the way it works is by unboxing the cache item back rather than some "generics" magic.
As I said, I am not an expert, and I have been searching to find references to this albeit not
too successfully as I am probably asking the wrong question!
Any ideas, or laughs at my stupidity most welcome! </t></t></t>
|
|
|
|
|
More fun... actualy found that in an ASP.NET page, you can of course do the following with the Cache object:
Cache.Cast<T> which takes the content of the Cache and makes it available to whatever generic type you need.
Also, got around (albeit I'm guessing not necessarily a best practice) the Cache retrieval part within a class using HTTPruntime and the following:
public T getCache<T>(string CacheID)
{
if (CacheID != null)
{
return (T)Cache.Get(CacheID);
}
else
{
return default(T);
}
}
Not pretty.. but works... the only thing now is finding out WHY and if I SHOULD !!!
|
|
|
|
|
|
I installed .Net framework 3.0 but not getting the templates of WCF WPF etc. What extra configuration is to be done for that.
Bijay Bhaskar Deo
Thanks & Regard
|
|
|
|
|
This is not the right forum for this question. However, I'm in a good mood so I'll answer it - you need to download the VS2005 extensions here[^] assuming you are using VS2005.
|
|
|
|
|
hi all, i have made asp.net application in C#. suppose my site adress is
"abc.com"
I have pages related to admin and user but there are no folder, there
are internal page links on my site, like login link, when login link is
clicked within site user is redirected to "abc.com/login.aspx" and this
appear as it is on Ie browser bar, what i want is it should
"abc.com/admin/login.aspx" or "abc.com" (change browser bar adress and use
httpcontext.rewritepath() method),
There more similar situations like this but that is simplest, i know
other solution of that instead of login.aspx, link href should be
"/admin/login.aspx" but i dont want this solution and use
httpcontext.Rewritepath() method.
what i am intrested is href should be "abc.com/login.aspx" but afer
clicking on link and on post back Browser bar should display
"abc.com/admin/login.aspx" or only "abc.com", i want change values from
browser bar.
i hope you understand this problem i am doing this asp.net C#.
Regards.
Tasleem Arif
|
|
|
|
|
The autoeventwireup , if it is set to false , it will not execute the code written in the page load function , and reverse is true.
My question is , how should i implement this case in the project and in which situation i should use it?
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Pankaj Garg wrote: how should i implement this case in the projec
you have create your own eventhandler and
delegte it to execute function. you have also create some custome property , if its true then you should delegete to that function else not.
Pankaj Garg wrote: which situation i should use it?
if you check "FileSystemWatcher" components in C# windows application, it has raised event like "Create, Delete , Rename and Changed" and according to that it delegate to some function.
Now there is a property EnableRaisingEvents . if you set it to yes then it will raised those events.
hope this clears you !!!
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
hai,
i am doing texteditor concept it return error message in
---->A potentially dangerous Request.Form value was detected from the client (HamHtmlEditor1:ContentHtml="dfdfdfd
i will search the google it return to set -->validateRequest="false"
i set it work fine ,i solve my error ,but i host website in my project. it is not work.the empty page display to me..
if you know the code or answer replay to me....
thank you
|
|
|
|
|
your problem is not clear . can you please inform it in details ?
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
i am using -->
]]>
]]>
]]>
<title>WebForm1
<uc1:hamhtmleditor id="HamHtmlEditor1" runat="server">
<asp:button id="Button1" runat="server" onclick="Button1_Click" text="Button" validationgroup="1">
c# coding:
protected void Button1_Click(object sender, EventArgs e)
{
string ss = ((hamHtmlEditor)this.FindControl("HamHtmlEditor1")).ContentInnerHtml;
con.Open();
SqlCommand cmd = new SqlCommand("insert into mail values('" + ss.ToString() + "')", con);
cmd.ExecuteNonQuery();
con.Close();
Response.Redirect("mailfinal.aspx");
}
i am using text editor .if i give the string it is accept.but i give
czvcvcv
it not accept it display the error----->
A potentially dangerous Request.Form value was detected from the client (HamHtmlEditor1:ContentHtml="dfdfdf
so how to slove the problem.if you replay it will help to me...thank you
|
|
|
|
|
add ValidateRequest="False" in page directive. Hope will solve your problem.
good luck !!!!
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
thank you..it work fine in local system..but i host website to my project i didn't get the text.the empty space store to the database in the server...
so help me...thank you..
|
|
|
|
|
Which Editor Control R u using ? is it any third part control or you developed that ?
Which browser are you using ? does that control support your bowser?
Please check !~!!!
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
sorry i donot know about control.i just download the project----->
http://authors.aspalliance.com/HabdulMalak/1156.zip
i donot know it is correct or wrong.please check and tell...
i have the browsermozilla firefox..
so replay to me....
|
|
|
|
|
|
hai,
it is going to same url and same 1156.zip file.so replay to me..
how to vote to you?
thank you..
|
|
|
|
|
i dont think so, please check correctly, i am providing you the same information form the same site itself.
Thanks
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
hai,
how to save edit text in database? do you know.
|
|
|
|
|
better try to use some open source editor that you can change as your own.
There are some Editor also available at codeproject itself. try to use them
Good luck !!!
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
thank you i try my best..........
|
|
|
|
|
i want create a RequiredFieldValidator in my form in c#.net programatically . but i dont know where should i write thats code. i write this below codes but where should i put them?
protected RequiredFieldValidator validator;
validator.ControlToValidate = "TextBox1";
validator.ErrorMessage = "*";
validator.EnableViewState = true;
validator.EnableClientScript = true;
validator.Display = ValidatorDisplay.Dynamic;
validator.EnableTheming = true;
validator.Enabled = true;
validator.ID = "validator1";
Page.Form.Attributes.Add("validator1", "validator");
|
|
|
|
|
add it in page_Load()
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|