|
I want to know how to be able to interact with asp page controls like buttons and dropdown lists without the whole page refreshing and also be able to use the query string to update the content within the contols without the whole page refreshing itself. Thank you in advance
ML Lingwati
|
|
|
|
|
You can use Ajax. UpdatePanel
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.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
How do i call the following method which is declared in a vb files
Public Function byteArrayToImage(ByVal byteArrayIn As Byte()) As Image
Dim ms As New MemoryStream(byteArrayIn)
Dim returnImage As Image = Image.FromStream(ms)
Return returnImage
End Function
I need to call this function here(Below)
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
End Sub
|
|
|
|
|
kaining89 wrote: How do i call the following method which is declared in a vb files
As this is inside a file, means it should have a class. Create the object of that class and call the method.
|
|
|
|
|
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
obj.byteArrayToImage()
End Sub
but i do not know how to pass the parameter in obj.byteArrayToImage(), what shld be inside ()?
|
|
|
|
|
You have declare your Function like this
Public Function byteArrayToImage(ByVal byteArrayIn As Byte()) As Image
Dim ms As New MemoryStream(byteArrayIn)
Dim returnImage As Image = Image.FromStream(ms)
Return returnImage
End Function
now if you have declare this in same page , then you can access it like this
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
obj.byteArrayToImage(byteArrayIn)
End Sub
but if you have this in a Different class , then you have to create an object of a Class like this
MyClass obj = new MyClass
obj.byteArrayToImage(byteArrayIn)
Hope this Helps
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.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
thanks. i placed the same code but obj.byteArrayToImage(byteArrayIn) - (byteArrayIn) is not declared. hope you can assist me with tht
|
|
|
|
|
This is a variable you need to pass in your Function. you have to know where is it coming from i cant know
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.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi,
I want to change my textbox default input language,
Currently the default language is English and in order to change it, the user has to hit ALT+SHIFT keys...
|
|
|
|
|
you mean to change the language of a textbox. Its totally dependent on the client browser configuration. Well, what google does is it changes the script through trapping the keystrokes.
You may send keystrokes to the server and process it to get the script in actual language. Use AJAX request to the server. Just create an http handler to process those requests.
hope you got my point. In this way you can also place quick suggestions as well...
|
|
|
|
|
Hi all,
I have created menu controls with the help of
<code><ul><li><a></code>
tag. The url page defined in the href attribute of anchor tag does not actually exist in the application directory instead, it comes from database and the logic for it is written in the application begin request event in global.asax.cs. but this event is getting called only once and is not getting fired whenever any menu is clicked. Please tell what could be the reason for it. If this event will not be called dynamic pages will not be created. Please help me.
|
|
|
|
|
Hi,
I am using a enumerable function using "yield return". This allows me to iterate through the items using for each loop. Since this is a lazy evaluation, after each iteration the control returns to the calling function.
How can I use the enumerable function without for each loop?
public static IEnumerable<int> GetValuesUpto(int n)
{
for(int ctr = 1;ctr<=n;ctr++)
{
yield return ctr;
}
}
So, when I call this function i.e.
int[] arr = GetValuesUpto(10);
What would be the result, will it work like a lazy evaluation and will return only the first value, or will it return the desired result?
Waiting for your replies guys!!
Vishwjeet
|
|
|
|
|
Iterator blocks are called when you want to fetch the data from the Enumerable.
Actually if you call the the function, it will not be called. Rather if you do a foreach on the Enumerable object the function will be called and will return you 10.
Just change your code a bit as I did:
IEnumerable<int> arr = Documented.GetValuesUpto(10);
MessageBox.Show(arr.ToList<int>().Count.ToString());
public static IEnumerable<int> GetValuesUpto(int n)
{
for (int ctr = 1; ctr <= n; ctr++)
{
yield return ctr;
}
}
Put a breakpoint in the line IEnumerable<int> arr = Documented.GetValuesUpto(10); . and also a breakpoint within GetValueUpto block. You will see the function is called when we try to call ToList () rather than the actual call to GetValueUpto . This is the main advantage of iterator blocks.
|
|
|
|
|
hi all,
i am creating a numberbox control and in that i want to find the cursor position so that i can restrict input at certain times at certain locations ...
.
so is thr any way i could get the cursor location or the index of the key pressed.
Thanks in advance
|
|
|
|
|
|
Hi ,
I found the solution for finding the cursor position in the textarea . i have used it in my numberbox.
@Abhishek Sur : thanks for the link , i found some useful stuff there which was useful.
Solution is :
<br />
var Curpos=-1;<br />
Curpos = srcElement.selectionStart;<br />
if (Curpos!=-1){<br />
if( document.selection ) { <br />
r = document.selection.createRange();<br />
r.moveStart('character', -myString.length); <br />
Curpos =r.text.length;<br />
} <br />
}<br />
<br />
<br />
<br />
Thanks and Regards,
Sriharsha
|
|
|
|
|
Wow... Nice to see you found out the solution.
You are most welcome if links helped you.
Cheers.
|
|
|
|
|
Hi,
I would like to design a master page in asp.net 2.0.
It should have a header,footer,leftpane for treeview and right pane for content placeholder.
I have done everything but my problem is it should auto fit to any screen resolution.I am able to do that for width, but not for height.I dont want to get even a vertical scroll bar.
In simple i want to develop a masterpage similar to msdn library website
http://msdn.microsoft.com/hi-in/library/w0x726c2(en-us).aspx[^]
|
|
|
|
|
Hello,
I am Developing a Web-Chat Application using ASP.Net with c# language. For chat window updation I am using
AJAX Panel and updation happen for every 1 second as the Timer control Interval given in Timer is 1 Second.
Updation code is implemented in Timer_Tick().
I feel is for every frequent time interval updation happens which can cause unnecessary load on the server.
Basically for chat application only when send button is clicked updation is needed. I feel AJAX Refresh is not needed when the user is idle i.e when the user doesn't click on send button.
My Query is it possible to refresh all the webpages of this particular link opened in different PC's when any user clicks on Send Button. What can i do for similar Implementation. If my query is not clear please
feel free to ask questions.
|
|
|
|
|
platso_588 wrote: Basically for chat application only when send button is clicked updation is needed. I feel AJAX Refresh is not needed when the user is idle i.e when the user doesn't click on send button.
So if you chat to me, I won't see it until I click a button ? Sounds like crap to me
platso_588 wrote: My Query is it possible to refresh all the webpages of this particular link opened in different PC's when any user clicks on Send Button
No. There's no way this can work, that's why you're using a timer.
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 in my repeater control i have two link buttons...,
which i have to display based on session value...,
if session value is null the linkbuttton2 have to hide...,
if session value will be there linkbutton1 have to hide...,
how to do it...,
smililarly...,if i click the linkbutton1 i want to show one modalpopupextender ...,
if i click the linkbutton2 another modalpoupextender have to show...,
how to acheieve this all...,
pla guide me...,
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
Just do
if(Request.Session["yourkey"] == null)
linkbutton2.visible = false;
else
linkbutton1.visible = false;
But you must be careful to this, as Asp.NEt doesnt renders visible=false controls to the client.
Otherwise you can use display:none style entry to the control Style property.
|
|
|
|
|
Hi, I use VS2005 C# for aspx.
- I want to use function in JScript.js. I added the following between . But it shows a blank page. (source can be viewed)
Removing this line the content can be shown.
How can it be solved?
|
|
|
|
|
Fix whatever is broken in your js file.
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 all!
I got the problems with ExportPanel Ajax Control.
I use this control to export to MS Word, Excel document.
But sometime it display the font with error like below:
This test is in .net page:
Khu - Block: DANH SÁCH NỀN NGOÀI DỰ ÁN
When it's exported to MS Word:
Khu - Block: DANH SÃCH NỀN NGOÀI Dá»° ÃN
But sometime it exports write. I don't know why this happen.
Who know this bug please help me.
My email: aeriscute@gmail.com
Thanks.
|
|
|
|