|
Content will not be going to store somewhere.
as soon as Respose.Write(strHTMLContent) this code is called
document is generated and it asked to save it on haraddrive.
(like when we are downloading any s/w from net)
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Hi
This is another code. in that i am displaying all data in grid
and exporting this data to word doc file.
Sub CreateDoc()<br />
Try<br />
<br />
Dim oStringWriter As New System.IO.StringWriter<br />
Dim strFileName As String = "ResultGrid.doc"<br />
Response.Clear()<br />
Response.Buffer = True<br />
'Response.ContentType = "application/vnd.ms-word"<br />
Response.ContentType = "application/vnd.ms-word"<br />
Response.AddHeader("Content-Disposition", "attachment; filename=""" & strFileName & """")<br />
Response.ContentEncoding = System.Text.Encoding.UTF7<br />
Response.Charset = ""<br />
EnableViewState = False<br />
<br />
Dim oHTMLTextWriter As New System.Web.UI.HtmlTextWriter(oStringWriter)<br />
<br />
DataGrid1.RenderControl(oHTMLTextWriter)<br />
Response.Write(oStringWriter.ToString())<br />
Response.End()<br />
Catch ex As Exception<br />
Response.Write(ex.Message)<br />
End Try<br />
End Sub
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
i am looking on it... if possible delete the last code !!!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Ok
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
yup .... now it looks Good !!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Yes
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
I have a list box with some item and Autopost back is true. when i select any one of item first item of list is automaticaly selected. how i can resolve this problem !!
Any idea !
Thanks in Advance !!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Hi
Are you binding dropdownlist data from database if yes then put
you code which you are using for binding in
<br />
if not page.ispostback<br />
'put u r code here<br />
end if<br />
this is happen because whenever you select item in dropdownlist page get refreshed and again dropdownlist is binded from db.
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
thanks for reply.
Rahul, if possible recheck the formating of code that where you post your code for word file creation . its totaly destroying the strcuture !!!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Ya its totally destroy structure?
Ok i am posting another code in that code i am generating document
from datagrid. See this in that post. I am editing existing code.
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Hi all
I have a login form(user name and password) that reads its data from a database, I need to check the password textbox letters case, e.g. if the user wrote "admin" it will be different than "ADMIN"...
Is there is any function to do that?
Regards...
Nour Abdel-Salam...
A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
|
|
|
|
|
use Regx !
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
How to do that sir...
Regards
Nour Abdel-Salam...
A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
|
|
|
|
|
Hi, I have written a Custom function for that. let me know if it work for you
public bool IsInputMatch(string UserInput, string DataBaseInput)<br />
{<br />
if(Regex.IsMatch(UserInput,DataBaseInput))<br />
return true;<br />
else<br />
return false; <br />
<br />
}
now if you use
if(IsInputMatch("AdMiN", "ADMIN"))<br />
MessageBox.Show("Valid User");<br />
else<br />
MessageBox.Show("InValid User");
Output : InValid User
and for this
if(IsInputMatch("ADMIN", "ADMIN"))<br />
MessageBox.Show("Valid User");<br />
else<br />
MessageBox.Show("InValid User");
Output : Valid User
----
Let me know when done !!! Good luck !!!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Very convenient. You can make a password that matches many different strings...
These all show "true":
MessageBox.Show(IsInputMatch("Anything that you like", ".*"));
MessageBox.Show(IsInputMatch("I mean anything", ".*"));
MessageBox.Show(IsInputMatch("Really whatever you want", ".*"));
MessageBox.Show(IsInputMatch("", "(hello)?"));
MessageBox.Show(IsInputMatch("hello", "(hello)?"));
MessageBox.Show(IsInputMatch("asdf", "...."));
MessageBox.Show(IsInputMatch("1234", "...."));
MessageBox.Show(IsInputMatch("baad", "...."));
MessageBox.Show(IsInputMatch("oops", "...."));
MessageBox.Show(IsInputMatch("1234", "\\d+"));
MessageBox.Show(IsInputMatch("0", "\\d+"));
MessageBox.Show(IsInputMatch("987489792364587634582345983745", "\\d+"));
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanks Abhijit. The same which i would like to post as my next question........ good nour123... me too need a solution for this... HELP US . - KARAN. can i get a simple example?
|
|
|
|
|
Hi, I have written a Custom function for that. let me know if it work for you
<code>
public bool IsInputMatch(string UserInput, string DataBaseInput)
{
if(Regex.IsMatch(UserInput,DataBaseInput))
return true;
else
return false;
}</code>
now if you use
if(IsInputMatch("AdMiN", "ADMIN"))
MessageBox.Show("Valid User");
else
MessageBox.Show("InValid User");
Output : InValid User
and for this
if(IsInputMatch("ADMIN", "ADMIN"))
MessageBox.Show("Valid User");
else
MessageBox.Show("InValid User");
Output : Valid User
----
Let me know when done !!! Good luck !!!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
THANKS YAAR!
|
|
|
|
|
you are welcome !!!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Thanks alot...
It works
Love you
Nour Abdel-Salam...
A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
|
|
|
|
|
welcome !!! if you like the ans then you should vote for them !!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Thanks yaar. And let me know how to disable the "COPY" option while user select the password and right click on it?
|
|
|
|
|
John Sundar wrote: And let me know how to disable the "COPY" option while user select the password and right click on it
it is very ease in windows just set
Textbox1.ShortcutsEnabled=false and use own ContextmenuStrip.
but i am not sure about asp.net . i have to check !!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
hi jonh , if you use html passwordtext box , it should not allow copy !!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
S..thanks.. i implemented it.... below there are two questions posted by me... if possible, help me plz. thanks in advance..........
|
|
|
|