1
Answer

linq with webform control

Photo of scampercat

scampercat

13y
1k
1
I have a linq data source control question for a new C# web form 2010 application I am writing. I need to bring in one schedule date table and one main table to the .net 2010 control to display. The schedule table is based upon the current processing month and year. The main table is based upon what was entered on the orginal application web.

Would you setup two separate linq data source obejcts and point them to the appropriate cells in the web form control? Would you select all the data you need  from the 2 unrelated tables in one linq statement and bring the data to the web form control? (The schedule dates are used to make data enter easier for the user. This keeps the user from having to enter dates.)

Can you tell how you suggest I accomplish this goal and point me to a references on how to complete my objective?

Answers (1)

0
Photo of Anupama Singh
NA 145 119k 15y
i call applet at master page

  <applet style="margin-top: 0px" height="20" width="950" align="top" code="Ticker.class"
                        codebase="abcd ">
                        <param name="BUTTONLAYOUT" value="links" />
                        <param name="YKORR" value="0" />
                                    
                     
                        <param name="BUTTON3ANZEIGEN" value="0" />
                        <param name="BUTTON4ANZEIGEN" value="0" />
                        <param name="BUTTON5ANZEIGEN" value="0" />
                        <param name="DELAY" value="15" />
                    
                      
                        <param name="IDLE" value="60" />
                        <param name="RICHTUNG" value="LINKS" />
                        <param name="TICKERDATEI" value="path of text file" />
                        <param name="BMP_LINKS" value="" />
                        <param name="BMP_RECHTS" value="" />
                        <param name="BMP_GO" value="" />
                        <param name="BMP_STOP" value="" />
                        <param name="BMP_HOCH" value="" />
                    ..................................
................................
                      
                    </applet>
0
Photo of Niradhip Chakraborty
NA 6.5k 527k 15y
I think if you can do it by manually then using that code also it should work.
Probably I need to check your pageload code.....
0
Photo of Anupama Singh
NA 145 119k 15y
no
0
Photo of Niradhip Chakraborty
NA 6.5k 527k 15y
Are you facing any problem to refresh the page with that code?
0
Photo of Anupama Singh
NA 145 119k 15y
i used this but problem is still same.........
0
Photo of Niradhip Chakraborty
NA 6.5k 527k 15y

If you made any changes in textfile you need to refresh the page because the page is loaded before with old set of data. If you made any changes in textfile it will not aware of that untill you refresh it manually.
You can use the folllowing code in <head></head> tag to refresh the page automatically.
<head id="Head1" runat="server">
   
    <meta http-equiv="Refresh" content="5">
</head>

Note: I have given content value is 5. So after every 5 second it will refresh the page. You can increase or decrease the time frame.
0
Photo of Anupama Singh
NA 145 119k 15y
i tried it but not solved.
actually i use applet for ticker.
data in ticker coming from text file when i make changes in text file chnaged data not reflecting immediately it reflected after browser refresh.
0
Photo of Niradhip Chakraborty
NA 6.5k 527k 15y

Try this code to clear the cache:
Response.Cache.SetCacheability(
HttpCacheability.NoCache);
Response.Expires = 0;
Response.ExpiresAbsolute =
Convert.ToDateTime(DateTime.Today.AddDays(-1));
Response.AddHeader(
"pragma", "no-cache");
Response.AddHeader(
"cache-control", "private");
Response.CacheControl =
"no-cache";
0
Photo of rajesh rajesh
NA 2 0 15y
use Timer to overcome this problem.

void Timer_Tick()
{
call the function to be refreshed.
}

put the Ticker control in the Update Panel and write the code to be refreshed in the Timer Tick event as shown above.

your problem will get solved.