|
Tried the above sugesstion....it didnt work....Can u plz recommend me some other soln..
modified on Monday, June 14, 2010 11:06 AM
|
|
|
|
|
Have you set the content type of your response to the mime type of PDF?
|
|
|
|
|
Ya...set the content type ...still it didnt help...i get a blank page as output
|
|
|
|
|
hi,
i created Dynamic "File upload Control" ,the problem was i need to get selected file name on Post Back,here I'm sending my code.please help me
Thanks & Advance,
Vishnu.
private void BindDyanmicControl()
{
try
{
HtmlTable htTab = new HtmlTable();
HtmlTableRow htRow = new HtmlTableRow();
HtmlTableCell htCell = new HtmlTableCell();
htCell.ColSpan = 3;
FileUpload flupLoad = new FileUpload();
flupLoad.ID = "FLD1";
flupLoad.EnableViewState = true;
Button btnNew = new Button();
btnNew.ID = "BTN1";
btnNew.Text = "UPLOAD";
btnNew.Click += new EventHandler(btnNew_Click);
htCell.Controls.Add(flupLoad);
htCell.Controls.Add(btnNew);
htRow.Controls.Add(htCell);
htTab.Controls.Add(htRow);
form1.Controls.Add(htTab);
}
catch (Exception _ex)
{ }
}
protected void Page_PreInit(object sender, EventArgs e)
{
BindDyanmicControl();
}
private void btnUpload_Click(object sender, EventArgs e)
{
//here i need to get selected file name
}
|
|
|
|
|
Please format any code snippets you post using the pre tags. You will get more from this community if you follow the guidelines.
What problems are you encountering?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
What is the issue you are getting?
|
|
|
|
|
Hi All,
i need to call code from code behind from java script how to do this
My Requirement is
I have implement ajax extender to get the id so when t lose focus from text box it should query data base and fill it into the other text box such as name , address.
Thanks,
amit
|
|
|
|
|
hi one way is u keep a button make it style display =none and in the click event u write the code which has to be executed when it is click.and the other thing is simple just call the button click event through javascript where ever u want .eb:document.getelementbyid('button').click();
|
|
|
|
|
Just handle one of the events for the input control such as onblur or onkeypress.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Look at the autocomplete extender
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
You can use AutoCompleteExtender ajax control
Also u can have a webservice to fetch the records from the DB
it has "ServicePath" attribute where u provide the path of the WebService
and "ServiceMethod" attribute takes the webmethod name which fetches the value from DB and displays
it so u don't have to worry about handling blur events etc..
http://opexsolution.com/forum/[^]
|
|
|
|
|
Hi,
I have an xml which looks like..
<nameid>1
<nameID>hi</nameID>
<nameID>bye</nameID>
<nameID>go</nameID>
<nameID>away</nameID>
<nameID>87687</nameID>
and the above needs to be changed to
<nameID>1</nameID>
<message>hi</message>
<action>bye</action>
<moreaction>go</moreaction>
<source>away</source>
<number>87687</number>
and the first xml which needs to be convert is very huge please let me know any feasible solution...
|
|
|
|
|
You're pretty much stuck. If the XML is organised into groups of nodes, such as;
<test>
<nameID></nameID>
....
</test>
Then you could write something to rename nodes 2 - 6 in each grouping. If the entire document though is nameID nodes, you're either going to have to through it all by hand and set the nodes up (not like a search and replace will help you) or you're going to have to add some organisation so that you can perform something similar to my first suggestion.
|
|
|
|
|
hi guys,
thanks for advance.
I'd like to do something as Google translate, but is more simple than google translate, and is somehow like an online webproxy. it should contain the following function descriptions:
1. get all text nodes from a web page
2. do some changes to the text nodes which is the result of the first step
3. put the changes back to original web page
4. display the changed web page again.
for example, i do some change to www.bing.com, i'd like to do things as follow:
1. get the webcontent of www.bing.com with WebRequest, let's assume the result is as below:
<html>
...
<body>
<span>WebPage</span>
<span>Pictures</span>
.....
<img src="/aa.gif" />
<input type="text" />
<input type="submit" value="Search" />
</body>
</html>
2.changed web page content is as below:
<html>
...
<body>
<span>MyTranslatedWebPage</span>
<span>MyTranslatedPictures</span>
.....
<img src="http://www.bing.com/aa.gif" />
<input type="text" />
<input type="submit" value="Search" />
</body>
</html>
could anybody give me some inputs according the descriptions above? thanks in advance!
|
|
|
|
|
Hi xianlong,
maybe you should take a look into HttpModules. You can find many articles here on codeproject on that topic. You can alter the result stream (your html code for example) in this module just like the way you want with the proxy.
Regards
Jens
When in trouble,
when in doubt,
run in circles,
scream and shout
|
|
|
|
|
Thanks Jens, the question i meet now is how to alter the result stream/ string. that is how to alter the relative path of the website to a absolute path, for example, when the code is
<img src="./a.gif" />, <a href="./default.aspx">Home</a>
good
how i alter them to
<img src="http://www.example.com/a.gif" />, <a href="http://www.example.com/default.aspx">Default</a>
better
and how to get the word "Home" and "good", and alter them to "Default" and "better"
is there any example code you know? thanks again jens!
|
|
|
|
|
Jens Meyer wrote: maybe you should take a look into HttpModules. You can find many articles here on codeproject on that topic. You can alter the result stream (your html code for example) in this module just like the way you want with the proxy.
Thanks Jens, the question i meet now is how to alter the result stream/ string. that is how to alter the relative path of the website to a absolute path, for example, when the code is
<pre> <img src="./a.gif" />, <a href="./default.aspx">Home</a>
good
</pre>
how i alter them to
<pre> <img src="http://www.example.com/a.gif" />, <a href="http://www.example.com/default.aspx">Default</a>
better
</pre>
and how to get the word "Home" and "good", and alter them to "Default" and "better"
is there any example code you know? thanks again jens!
|
|
|
|
|
Dear xianlong,
i assume you have a couple of rules, for example how to translate a link or a specific string. So you have to replace the link and words in the stream according to the rules you have made. For example you translate all addresses in the output stream by replacing the '.' with htt://www.example.com. To do so i would suggest to use reguar expressions. Using RegEx you can get a set of matches and do the same translations for each of the matches.
Since you have different tasks (relative path to absolute paths and translations of specific words) i would also suggest to use a different httpmodule for each of them.
Im afraid i cant give you any real examples to use since i dont know all the details of you task. But replacements can be achieved quite easily using regular expressions.
Regards
Jens
When in trouble,
when in doubt,
run in circles,
scream and shout
|
|
|
|
|
thanks Jens! i've solved the questions. solutions is i write an html analyzer, and analyze the html document to get the dom tree. and then, alter the dom tree is then much easy.
|
|
|
|
|
Hi All,
I have one requirement i have one search text box and i have 10000 entry into the database. so when when user write any value to text box it should search in database and all value should come in below like drop down.
how to do this which control of ajax we need to use?
Thanks,
amit
|
|
|
|
|
|
|
hi ,iam using asp.net with c#
iam trying to return sum of amount between the date values by using the same querry in sql it it working perfect . but when iam using in asp.net with c# ,it is returning zero value .....can you correct my code which helps me
SqlCommand cmdallltransactions = new SqlCommand("SELECT SUM(Amount) FROM AllTransactions WHERE TransDate BETWEEN '"+ txtfrom.Text +"' and'" + txtto.Text + "'and (TransCode <> 0) and BranchKey=" + Convert.ToInt32(Session["BranchKey"]) + "GROUP by BranchKey", con);
con.Open();
txttotal.Text = Convert.ToString(Convert.ToInt64(cmdallltransactions.ExecuteScalar()));
con.Close();
|
|
|
|
|
Check if your session return null value or correct value, put space after and before AND conditions,GROUP BY condition :
developerit wrote: SqlCommand cmdallltransactions = new SqlCommand("SELECT SUM(Amount) FROM AllTransactions WHERE TransDate BETWEEN '"+ txtfrom.Text +"' and '" + txtto.Text + "' and (TransCode <> 0) and BranchKey=" + Convert.ToInt32(Session["BranchKey"]) + " GROUP by BranchKey", con);
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
hi, every thing is ok, it is returning session values also,i have checked with break ponts.but at final it is returning zero . even there is already values are present in database it is returning zero.
can u correct the code which helps me.
|
|
|
|